[flexcoders] Spring Security Login From AIR Application
Hello, I am in process of Converting Flex-BlazeDS-Spring-SpringSecurity application to AIR-BlazeDS-Spring-SpringSecurity Stack. The main reason is the client's requirement needs some local data storage and client feels it inconvenient to use application in browser. Backend Application server is TOMCAT. The Browser Based working Flex application has following work Flow. When User Connects to site Login HTML page is presented with Login Name, Password edits. User enters LoginName, Password and submits the form to j_spring_security_check. Spring security is configured in such fashion that on successful login it takes to page containing Flex application. Flex application in its application complete event makes a HTTPService call to a settings.xml and gets Global Settings for the application then it dynamically creates channelSet defs and starts making RO calls for spring services. Application generates reports to PDF/xls/xlsx/ods etc. etc. formats and saves at secured location and are being retrieved by making HTTPService calls to those files. I would like to maintain same workflow as far as possible though I am ready to change it, if its not practically possible in AIR. Please Guide me on 1. How to Login at HTTP level from AIR application. 2. How to create secured AMF channels (AMF channels are secured in Spring Security to ROLE_AUTHENTICATED). 3. How To retrieve files from locations which are secured by spring security (access controlled to ROLE_AUTHENTICATED) Thanks and warm Regards Raja Patil
[flexcoders] Re: Spring Security Login From AIR Application
Please do not mind I figured out How to do it. Its simple. Just use URLLoader, URLRequest, URLVariables Classes and emulate what HTML form does. here is the code var urlVar:URLVariables; var urlReq:URLRequest; urlVar = new URLVariables(); urlVar.j_username = CEO; urlVar.j_password = raja1248; urlVar._j_spring_security_remember_me = false; urlReq = new URLRequest(http://dell-15rse:8080/Tej-EIS/j_spring_security_check;); urlReq.method = POST; urlReq.data = urlVar; var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, completeHandler); loader.addEventListener(Event.OPEN, openHandler); // loader.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); // loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); try { loader.load(urlReq); } catch(error:Error) { trace(Unable to load requested document.); } completeHandler receives whatever page mentioned for login success/login failure in form-login element of spring security config. On login success, subsequent requests to secured resources are possible by default nothing special is to be done. I am now trying to explore possibility of raising exception in case of login failure so that I can use HTTPService and its result and fault events by spring security config modifications. Hope this helps to someone who fumbles on AIR login issue. Thanks and warm regards Raja Patil
[flexcoders] Flex, BlazeDS, Spring BD Integration, Spring, Java In Tomcat Cluster.
Hello, I have Flex, BlazeDS, Spring, java application working in Standalone Tomcat Instance. For scalability we decided to test in Vertical Cluster of three Tomcat Instances. Initially we tested a simple JSP maintaining session attribute of counter in HAProxy, Memcached-Session-Manager (MSM) and Couchbase-Server for session replication and that test got passed. Secondly we decided to Test the working Flex application in that cluster. Initially Kryo serialization gave problems so we shifted to java serialization and application could Load. But we started getting error Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly I googled a lot for Clutering Flex-BlazeDS application howtos but could not succeed. Can somebody help us in this situation. we are using Flex 4.6, BlazeDS 4.0, Spring BDS Integration 1.5.2, Spring 3.1.2, Open JDK 1.6, Tomcat 7.0.29, on Ubuntu 12.04. HAproxy, Couchbase-server installed from repository, MSM downloaded from its site and configured according to wiki page for it. Thanks and warm regards Raja Patil
[flexcoders] Defining Style For spark Alert/TitleWindow Header in .css
Hi friends, I am developing a project in FlashBuilder 4.6. I am trying to define style of header with specific colors for its background and Font. The thing which I have tried is as below but I am able to change the background color and apply flat looks (solid Color) to the title. Please guide me how can i do That. .AlertTitle { color: #376BAD; fontFamily: Verdana; fontSize: 18; fontStyle: normal; fontWeight: bold; } mx|Alert { background-color: #E4EBF5; background-alpha: 1; borderStyle: solid; borderColor: #376BAD; borderVisible: true; color: #0066FF; fontFamily: Verdana; fontSize: 12; fontStyle: normal; fontWeight: bold; lineBreak: explicit; title-style-name: AlertTitle; } Thanks and warm regards R. S. Patil
[flexcoders] Re: Time Problem flex4 + blazeDS + spring
Thanks Evan Klein for response, I read the link you mentioned and tried to dig further to root cause of the problem. Just before executing the RO's method the values of birth time are as follows case 1 - 01 Jan 1900 05:30:00 and timezone offset is -330 hence UTC should be 01 Jan 1900 00:00:00 and it is as expected but when I look at network monitor trace for request/response it is like -- birthTime=Mon Jan 01 05:53:20 IST 1900 on server side timezone offset is -330 here actually 23 min 20 seconds are being added. case 2 - 01 Jan 1900 05:59:59 and timezone offset is -330 hence UTC should be 31 Dec 1899 23:59:59 and it is as expected When I look at Network Monitor it is birthTime=Mon Jan 01 05:59:59 IST 1900 which gets translated on server side correctly. since timezone offset there is -330 So I think that when AMF message is created conversion routine is behaving as expected but since I dont know much about timezones and other related matters First I will dig on server side about timezone offsets values and let you know. So long untill then. Thanks once again and regards Raja. --- In flexcoders@yahoogroups.com, Evan Klein e...@... wrote: The crux of it is that on transfer of time the client is converting time to local timezone. On get/set of these values the time must be converted to whichever timezone you would like to operate in. Read this blog: http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html Evan Klein http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html On Sun, May 23, 2010 at 6:57 PM, raja_s_patil kpr.rspa...@... wrote: Hello I am developing my first application in which I have to deal with time. On server side java VO i have defined the field as java.sql.Time and on flex side VO it has to be date. This is happening in windows XP client (browsers Firefox Chrome) while inserting data I am making a fresh copy of Flex VO and time is set as 10:00:00 the timezone set for XP is +05:30 when its received at Java service its 10:23:20+0553 and gets saved to database as 10:23:20. When I retrieved from Java and send back to Flex for editing it comes back as 10:23:20+0553 and now if I set it again to 10:00:00 it gets saved properly. Means in edits no 00:23:20 additions are there but for inserts addition is there. I guess that since TimeZone is taken as +0553 rather than +0530 23 minutes might have added but what about 20 seconds why, where and how 00 23 20 being added ? Are any settings to be done on client side or server side. Server is KUbuntu 9.10 java latest installed from repository and windows xp being used as VM on Vmware all set up is on Dell Vostro 1710 Laptop. Thanks and best regards Raja
[flexcoders] Re: Time Problem flex4 + blazeDS + spring
hello Evan Klein, I studied Whats happens to timezone offset on server side for case I i.e Time is 05:30 which is received as 05:53:20 on server has timezone offset as 2120 millisecs. which translate to 05:53:20 for case 2 i.e. Time is 05:29:59 which is recived correctly on server has timezone offset as 1980 which translate to 05:30:00 it seems that on serverside when date is translated offset of 05:30:00 is taken though it should be 05:53:20 hence difference of 00:23:20 is being there. Yes I got answer how 23:20 difference is occuring but there are two offsets are there when standard IST is +0530 how this 05:53:20 offset is comming in to picture ? that to precisely at threshold of 05:30 has it something to do with DST ? One more question Flex is also converting 05:29:59 with 05:30:00 offset and when time is 05:30:00 its also using 05:53:20 then why java is using 05:30 offset when time is 05:30 and letting discrepancy of 23:20 to slip in in converted time. Really this is driving me mad. it seems that time date dealing in flex java has lots of tricks which need to reveal. Thanks and best regards. Raja --- In flexcoders@yahoogroups.com, raja_s_patil kpr.rspa...@... wrote: Thanks Evan Klein for response, I read the link you mentioned and tried to dig further to root cause of the problem. Just before executing the RO's method the values of birth time are as follows case 1 - 01 Jan 1900 05:30:00 and timezone offset is -330 hence UTC should be 01 Jan 1900 00:00:00 and it is as expected but when I look at network monitor trace for request/response it is like -- birthTime=Mon Jan 01 05:53:20 IST 1900 on server side timezone offset is -330 here actually 23 min 20 seconds are being added. case 2 - 01 Jan 1900 05:59:59 and timezone offset is -330 hence UTC should be 31 Dec 1899 23:59:59 and it is as expected When I look at Network Monitor it is birthTime=Mon Jan 01 05:59:59 IST 1900 which gets translated on server side correctly. since timezone offset there is -330 So I think that when AMF message is created conversion routine is behaving as expected but since I dont know much about timezones and other related matters First I will dig on server side about timezone offsets values and let you know. So long untill then. Thanks once again and regards Raja. --- In flexcoders@yahoogroups.com, Evan Klein evan@ wrote: The crux of it is that on transfer of time the client is converting time to local timezone. On get/set of these values the time must be converted to whichever timezone you would like to operate in. Read this blog: http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html Evan Klein http://cookbooks.adobe.com/post_Date_time_transfer_in_BlazeDS-13114.html On Sun, May 23, 2010 at 6:57 PM, raja_s_patil kpr.rspatil@ wrote: Hello I am developing my first application in which I have to deal with time. On server side java VO i have defined the field as java.sql.Time and on flex side VO it has to be date. This is happening in windows XP client (browsers Firefox Chrome) while inserting data I am making a fresh copy of Flex VO and time is set as 10:00:00 the timezone set for XP is +05:30 when its received at Java service its 10:23:20+0553 and gets saved to database as 10:23:20. When I retrieved from Java and send back to Flex for editing it comes back as 10:23:20+0553 and now if I set it again to 10:00:00 it gets saved properly. Means in edits no 00:23:20 additions are there but for inserts addition is there. I guess that since TimeZone is taken as +0553 rather than +0530 23 minutes might have added but what about 20 seconds why, where and how 00 23 20 being added ? Are any settings to be done on client side or server side. Server is KUbuntu 9.10 java latest installed from repository and windows xp being used as VM on Vmware all set up is on Dell Vostro 1710 Laptop. Thanks and best regards Raja
[flexcoders] Link button custom look
Hello, I would like to have link button a custom look. e.g when not selected it should have some background color with rounded corners, when rollover it should have other background color and when its in pressed state it should have some other background color. with styles properties I could change only font colors but not background colors. Can somebody give me idea how can I do this ? Thanks and best regards. Raja.
[flexcoders] Time Problem flex4 + blazeDS + spring
Hello I am developing my first application in which I have to deal with time. On server side java VO i have defined the field as java.sql.Time and on flex side VO it has to be date. This is happening in windows XP client (browsers Firefox Chrome) while inserting data I am making a fresh copy of Flex VO and time is set as 10:00:00 the timezone set for XP is +05:30 when its received at Java service its 10:23:20+0553 and gets saved to database as 10:23:20. When I retrieved from Java and send back to Flex for editing it comes back as 10:23:20+0553 and now if I set it again to 10:00:00 it gets saved properly. Means in edits no 00:23:20 additions are there but for inserts addition is there. I guess that since TimeZone is taken as +0553 rather than +0530 23 minutes might have added but what about 20 seconds why, where and how 00 23 20 being added ? Are any settings to be done on client side or server side. Server is KUbuntu 9.10 java latest installed from repository and windows xp being used as VM on Vmware all set up is on Dell Vostro 1710 Laptop. Thanks and best regards Raja
[flexcoders] TitleWindow Show and Hide effects
Hello, In My Project I am Using many TitleWindows as popups via PopUpManager Create and remove popups methods. All is working fine. Now I would like to apply some effects like fade or zoom while the popup is being shown and removed and I would like to define those effects in a central location so that in case of refactoring the effect we have to change at only one place and all popups in application have same effect. Can Somebody guide me how can I achieve this ? Any readable material like book, howto, example, blog URL will be a great help Thanks and regards Raja
[flexcoders] How to use blue plastic theme plz. Guide
Hello, I am developing my first flex project and I would like to use Blue Plastic theme to my project. I have downloaded the zip file but I could not make out how to apply to my application. Can Somebody guide me in form of a short how to, URL to related material, a example application etc. etc. Thanks and Regards R. S. Patil
[flexcoders] Re: How to access web page on own web site.
thanks Tracy Spratt, You want to use Flex to navigate to html pages? If so, that is a serious waste of Flex RIA technology. Well, Since Flex application is occupying almost whole space in browser to best my knowledge I found only this way to jump to Home Page and Logout from Spring Security. Can u suggest me some Good Practices material to read as far as designing Flex UI is Concerned. Till date I have very long experience as far as Desktop database applications are concerned. But web applications seems to be altogether different beast to tame. I think i have to repolish my experience and knowledge in context of web UI design since SDI or MDI windows interface seems to be not a way as far as web applications are concerned so I have to radically change my thinking for Web UI design But you can call navigateToUrl(). Thanks for the tip, Time being I will use this and proceed, hope u consider above mentioned loud thinking and help me in this respect. Thanks and regards Raja.
[flexcoders] How to access web page on own web site.
Hello, I am beginner in flex and developing a test project using flex, spring, spring-flex, spring security and iBatis. The test application is mix of jsp pages and flex. The application is embedded in one of jsp pages. We are using a jsp page for logging in and on successful login page with flex application is shown. Till this it works fine. In flex application i have put few buttons which control state of a view stack and few buttons like Home, logout etc. etc. should take user to respective internal web pages. What shall I put in the onclick events so that user is diverted to respective pages of the application and with logout button it should logout from spring security. For logout the equivalent code in jsp is a href=c:url value=/j_spring_security_logout/Logout/a for home it is a href=./../index.jspHome/a Thanks and best regards Raja
[flexcoders] How To Print a text File ?
Hi, I am developing a flex application with PHP backend. I have created a Report in PHP in the form of Text file and I would like to print it on client side either on printer attached to client or network printer on Client LAN. How could I do this without disturbing Pagination in text file. The text file contains page break characters at end of every page Thanks and best regards Raja.
[flexcoders] need help to print text file available on server
Hi, If a text file is created on server through PHP Can Flex application print it directly on client's LAN printer ? If yes HOW ? Can it print that in Fast DMP mode i.e. raw text printing to dot matrix printers ? if not what alternative can be used ? I am able to download it from server and save locally or show it in another browser window/tab. The user wants it to be printed directly from flex application in fast DMP mode rather than using DOS commands like copy filename.txt lpt1: cr or any other local GUI program which can put raw output to windows print queue but that is not acceptable. Thanks and best regards. Raja
[flexcoders] Printing in fast DMP modde.
Hi, I would Like to print local/remote plain text files in fast dot matrix mode i.e. raw text output to printer, equivalent to DOS command is copy filename.txt lpt1:. Raw text output to printer is required since its almost 10/15 times faster than equivalent gfx printing. Can It be done in flex ? How ? Thanks and best regards Raja
[flexcoders] Re: Nested Objects with webORB PHP
thanks valdhor Just treat them as you normally would. WebORB's serialization/deserialization should take care of everything for you. I have used nested objects (Or objects containing other objects) when sending from PHP to Flex. I have not done it the other way but would expect it to work the same. Well i tried PHP to Flex successfully works nicely. but Flex to PHP receives Object as VOPurchase order but following code causes some problem $arr = array(); foreach($voPO as $key = $val) { $arr[$key] = $val; } return $arr; I suspect that object sent and received from flex is not exactly same as object voPO created natively in PHP. B'coz same code works fine if i create it just above the $arr statement and returns array to flex nicely. But when I try to do with parameter received from flex channel disconnect error is reported. If you are having problems try seeing exactly what you are sending/receiving with Charles (http://www.charlesproxy.com). Thanks for the link. But its a commercial project any free or open source utility (win/lin) such as charles ? Thanks and best regards Raja
[flexcoders] Nested Objects with webORB PHP
Hi, In my project I want to save/retrieve following objects class PurchaseOrderVO { PO_no:int; . other header info ... Items:arraycollection; } The Items arraycollection contains array of following class class POItem { Item_cd:string; Item_rate:number; Qty:Number; Amount:Number; schedule:Arraycollection; } the schedule array collection contains following class objects class itemSchedule { DeliveryDate:date; Qty:number; remarks:string; } can somebody guide me about Flex and PHP code I should use to save these to three different tables PO_Master; // po header table PO_Items; // po items FK in POmaster PO_SChedule; // schedules FK in POItems Thanks and best regards Raja
[flexcoders] Re: CakePHP+CakeAMFPHP vs WebORB dialema
Thanks Steve, There are a couple problems I have found with AMFPHP. The first is an error that pops up intermittently. I can't remember it exactly but have posted about it before. Suddenly it appears for no reason and you can't get rid of it no matter what you do. Changing to Weborb fixed it for me (And others). I think Delivery is in doubt this is that error I searched the forum and found that u mentioned this in a post on context of amfPHP. there also u have mentioned about webORB. I have forwarded that post also to my evaluation team. Secondly, I don't believe AMFPHP is actively updated any more. The developer, Wade Arnold, now works for Zend and is the lead developer for Zend_AMF. True, I agree with u, I also doubt about future releases of amfPHP. Anyways before sticking to webORB the team should not get feeling that webORB is forced on them. In my way of working they should come out with name of product they are convinced about.In heart of my heart i know that webORB will be the thing they will come out with. BTW which framework u are using on server side ? Thanks and Best Regards Raja
[flexcoders] Using some frameworks for PHP serverside
Hi, With lot of help from Steve on this list I could get a Flex test application running with webORB and PHP-Firebird as serverside many thanks to him. We also trying run it with other AMF alternatives just for evaluation otherwise webORB is very satisfactory. Performance is acceptable, Easy to develop and deploy. Now we have been advised by many ppl on Firebird-PHP and On this list also to have some PHP frameworks like Symphony, CakePHP, Zend etc. etc.as wrappers to server side PHP. We would like to know why we should wrap serverside with these framework and what will be the benefits in that. According to discussion we had it is going to add another layer in application then we fear about performance. But since these frameworks are there and being used extensively inspite of this issue there must be some advantage out weighing the performance penalty but since this is our first web application so we are not in position to judge that. Please help us in this matter. Similarly also suggest some good framework which is high performing, easy to code and deploy, if at all it is beneficial to use such framework on server side PHP. Thanks and Best Regards Raja
[flexcoders] Re: CakePHP+CakeAMFPHP vs WebORB dialema
Thanks Steve, Actually, WebORB includes a lot of examples including CRUD. Once you download and install WebORB on your server, just navigate to http://yourserver/LocationYouInstalledWebORB/ This should bring up the console. Click on the Examples tab and then click on the tree dropdowns - there are a lot of examples. Well, Today I spent almost 1/2 day with Management Console to get acquainted with webORB. It seems to be promising to me. The part leftout was database application I could just see through WDMF. I could see only MySQL and MS-SQL there for code generation. Do you know whether Firebird, PostgreSQL and Oracle are supported ? Which database abstraction Layer they adopt. Is it AdoDB ? Can I Add these three to management console for code generation ? Thanks and Best Regards Raja
[flexcoders] Re: CakePHP+CakeAMFPHP vs WebORB dialema
Thanks Steve, AFAIK no - They give you enough to get going but any further is up to your own development efforts. There should be no reason you can't add to the console for code generation. In my case, I did not use any of the examples or code generation - I just built everything from scratch. I too will follow the same, to begin with I will generate code with mySQL then base Firebird PHP vos with ADOdb data abstraction. What do u think about it ? Thanks and Best Regards. Raja
[flexcoders] CakePHP+CakeAMFPHP vs WebORB dialema
Hello, With reference to our topic few days ago and responses there on we are converging on PHP as server side technology. Within that we shortlisted two options 1 CakePHP + CakeAMFPHP - Adapter classes to make AMFPHP work seamlessly with CakePHP. This way, you can leverage your productivity by using CakePHP features on the server side to build your application server and use CakeAMFPHP to send data back and forth Flash/CakePHP. You can also have a HTML version of your Flash app without headeaches. 2 WebORB - WebORB for PHP is server-side technology enabling connectivity between Flex and Flash Remoting clients and PHP applications. WebORB for PHP can be installed into any PHP5 application to expose PHP classes as remote services. The product provides a complete implementation of the Adobe's AMF0 and AMF3 messaging protocols and thus supports any Flash Remoting or Flex client. What we need a fast performing, easy to understand and code and easily maintainable data abstraction layer. We are prefering to ability to change backend database to one of Firebird, PostgreSQL, MySQL, Oracle and MS-SQL. Similarly ability to embed business logic in that layer. So whatever study we had done so far we are tilting towards CakePHP but WebORB is also equally competing. We are not able to make up or Mind so can somebody guide us on this ? Thanks and Best regards Raja
[flexcoders] Re: CakePHP+CakeAMFPHP vs WebORB dialema
Thanks valdhor, Sorry, I cannot comment on cake as I have not used it. I do know that WebORB is fast, reliable and community support is very good. I find it very easy to code for (Although I could be biased as I have used it for a long time). I would be reluctant to use CakeAMFPHP as I don't know the level of support I could get from the community. There are a lot of WebORB users here on FlexCoders so any questions you will have will likely get a response. I have never seen a query related to CakeAMFPHP on FlexCoders. Also, with WebORB, if you ever need enterprise support, you have the option of paying for it. Yes I agree with you, If major section of flex coders is using webORB then, since its my first web application, I will prefer to go with majority i.e. webORB. Well the necessary push required for decision making has been given by you. Now can u help me a little more by either sending me a simple CRUD application on some Table or u can pass on a URL for the same. We will start the work the moment we get an example. Its better to follow others footprints initially till some experience is gathered. Let me tell u guidance about having PHP, adodb as serverside on this list we found very usefull since with in a day or two we could start right from installation to a test.PHP script listing a database table in browser. This gave us lot of confidence. Thanks once again and best regards. we are very grateful this list Raja
[flexcoders] Re: CakePHP+CakeAMFPHP vs WebORB dialema
Thanks Steve, Actually, WebORB includes a lot of examples including CRUD. Once you download and install WebORB on your server, just navigate to http://yourserver/LocationYouInstalledWebORB/ This should bring up the console. Click on the Examples tab and then click on the tree dropdowns - there are a lot of examples. Unfortunately We could not makeout where to extract the zip file we have downloaded, i.e. installing webORB. The hint in this post has given us clue that it should be Document Root of apache or a alias should be defined in apache to extracted directory in Apache, Am I right ? we will try this. The webORB getting started page do not explain it clearly to beginners like me. Also, I have posted a couple of examples myself. Check out these threads... http://tech.groups.yahoo.com/group/flexcoders/message/126803 http://tech.groups.yahoo.com/group/flexcoders/message/119962 There are others - I just can't find them. These should be more than enough to get you going. Thanks a lot we will come back to list after trying all mentioned above. BTW ppl here talk about wrapping it in some wrapper what is that ? and what purpose it serves. Thanks and best regards. Raja
[flexcoders] Re: CakePHP+CakeAMFPHP vs WebORB dialema
Thanks Brad Bueche, If you have SLA's in terms of maintenance and production response with your customers you may want to partner with the party that can also offer that contractural level of service to you. (My experience with the webOrb team is that they are very responsive). With that said you may also want to look at Zend before you make a final decision. Well we going to have a pilot application, so we will evaluate Zend also in due course of time depending upon experience we have. If it serves purpose better then we can adopt it in actual development. Thanks and best regards. Raja
[flexcoders] Re: Need Suggestions for Reporting In Flex Applications.
I have no idea. I stream the resultant PDF or Excel file to the user so they can open it in the native application. Well purpose of xls sheets is for further analysis so help of native application is necessary, And as far as pdf are concerned Firefox can show them in another tab I dont have any idea about IE bcoz i stopped using it long ago. Anyways I am getting feeling that Flex is bit weak as far as reporting is concerned. The other features as really fascinating the most important feature I liked is its easy to learn and adopt. I am finding it comfortable in evaluation phase itself I have not enough experience in flex except working part time that to for evaluation. Anyways I have to find out some good Serverside reporting tool and make Flex to communicate with it. It seems that cakePHP can Integrate with BIRT but I have to investigate it in Detail. I will post about that when we makeup our mind on something similar. Thanks and best regards Raja
[flexcoders] Re: Need Suggestions for Reporting In Flex Applications.
Thanks Dean, I have no idea about the dot matrix printers. But generally I do all my reporting using PHP. At the end of the day flex is in a browser and you are going to be limited by that. I'm sure PHP can produce a format that would work well for a dot matrix printer. If not, you could always have a TCP server written in any language to allow Flex to send data to it for reporting. This would be done using socket code in Flex. This also requires the server to accept a request for a security policy on a specific port. I will look for details on that. Well, I was bit worried about Flex's capacity to produce reports I dont mind about PHP producing reports in text format if it can write text file on server which can be fetched to client via FTP or if PHP can produce PDFs that can serve purpose of Windows graphis mode printing. The data exports to xls, dbf, ods etc. etc. still remain. I dont know what to do about. For sec of discussion how about using Birt on server to produce reports? have u given any thought to this ? But again we have to have Java at server. Can PHP send data to any program on server to produce reports then we can use delphi exe to run in wine and listen to TCP port on Linux Server and if its windows server then it can run natively. I dont know what reporting strategies are followed by ppl developing web applications. I dont have any experience in web development but there must be some way to produce reports, Since all over the world big web database applications are already running. BTW how u are doing reports I will follow your suit till we find some generous way for elegant reporting in flex. Thanks once again and best regards Raja
[flexcoders] Re: Need Suggestions for database application.
Thanks Lee, I have been searching around for a while on different setups for flex and have recently been using the following: A Flex UI with symfony framework on php5.2.8 on MySQL database. Although I have only been trying out the symfony framework for a while it appears very powerful and would meet your criteria of using multiple database vendors. There are also some great tutorials on their site www.symfony-project.org Well one more avenue, I will consider this too. Just for sec of information can u just briefly mention how u are using it wrt Flex application and how database abstraction is achieved in Symphony ? To best of my knowledge only persistence is to be handled by PHP server and in a very fast browse of website i could not locate any information about handling persistence. I feel that Flex application will need data to/fro from server either in XML format or in form of data objects rest of the things will be taken care by Serverside framework. Off course performance also a factor to be considered. Have u tested it on multiple dbms ? Thanks Once again and best regards. Raja
[flexcoders] Re: Need Suggestions for database application.
Thanks JC for ur response, PHP is good for server-side and there are frameworks that will help you encapsulate database layer so you can easily switch from one db engine to another e.g. MySQL to PGSQL,etc. May I request u to name good ones so that our study minimizes to few ones for suitability. I Guess these will be Hibernate equivalent, are they ? Built in PHP is PHP Data objects library that can help you with this problem as well if you need a thin layer for your database layer. True we searched the links for PDO Steve has given and going to study them in detail for judging its suitability in our project. if u know some more good alternatives plz go ahead and suggest us since we are starting a fresh we dont have constraints. However we will give enough time to finalize the data access layer since that will be a strategic decision for our all future web applications. So we will evaluate thoroughly every short listed framework and technology for suitability in our most of the existing projects which probably might need to be converted into web application. Thanks and best regards. Raja
[flexcoders] Re: Need Suggestions for database application.
Thanks Tim Rowe There might be a few others in PEAR, but start with PEAR::DB http://pear.php.net/package/DB We will search there as quick as possible. Can u tell us more about security and performance issues if there are any, in adopting PHP as server side technology ? Thanks once again and best regards Raja
[flexcoders] Re: Need Suggestions for database application.
Thanks Deane Venske and steve for ur valuable guidance, Now the data access ideas are taking some shape. now we have to study PHP first then the PDOs and finally the webORB. As far as PHP IDE is concerned we have to use Some open source solution initially till budget gets approved then we can think of commercial product.But by that time to develop pilot project I think its OK. I also read few threads about PHP vs JAVA as middle tier and found that PHP is not altogether rejected but almost everybody has agreed that its easy to learn, code and development is much faster compared to Java. Exactly this is what is expected from a developer, a fast response. We have decided that initially we will develop our first project with PHP as middleware and if we face some serious probles regarding security, scalability and performance we will think of Java middleware and have taken our client also in confidence he too have indicated consent to this idea. So this is the story at this moment and we are starting to read PHP from tomorrow may a week or two will be required to get things atleast going in PDO and webORB way meanwhile I have question about the third aspect of application i.e. Reporting for that I will open up a fresh thread Hope u ppl also contribute to that also. Thanks once again for sharing experience and taking us in right direction. I would like to express a sincere gratitude to all of you on behalf of our team. Raja
[flexcoders] Need Suggestions for Reporting In Flex Applications.
Hello Friends, We are in process of evaluating Flex for Converting a Delphi-Firebird Desktop C/S application to a web application. Till date this list has helped us in two aspects of Application UI and Data access. Now we need help on Third aspect of Application REPORTING. The application under consideration has many reports. All report generating forms accept information from user and that is passed as parameters to Stored Procedure in Firebird and the it passes report data in table format and being printed or saved to disk file. The general features of existing reporting solution we have provided are all reports can be printed in Std Windows Printing mode and fast Dot Matrix Printing mode. Similarly base data for that report can be exported to almost 13 different formats like, doc, XLS, PDF, XML, latex, CSV, Text, ODT, ODS, dbf etc. etc but most popular are xls, pdf, ods and dbf. we would like to have similar functionality in flex also. Can somebody tell us about how reporting is done in flex and mention whether above functionality is achievable in Flex. Thanks and Best regrds. Raja
[flexcoders] Re: Need Suggestions for database application.
Thanks Steve and Deane Venske for a valuable suggestion, I would like to take ur suggestions and study it further in details i.e. with a hands on experience before we adopt it in the project. Its nice that Deane Venske has past experience in delphi so his opinion is valuable for us. Well Deane Venske I would like to know more about PHP and PDO can u suggest me some study material and links so that it could save some time us. BTW Can u give us some guide line for having a Database independent application. Which PHP u are using 5 or latest 6 ? What u would like suggest us 5 or 6 ? Right now we have installed WAMP (Windows, Apache, MySQL PHP) and Flex builder. Our training resources are Lynda Essential, Beyond basics and Total training Flex 3. about 2/3 books on Flex and action script, and off course this list is a very valuable resource. last minute question, can Delphi PHP be helpfull ? thanks once again and best regards Raja
[flexcoders] Re: Need Suggestions for database application.
Thanks Steve, PHP 6 is not out yet and won't be for a while. The latest Release Candidate is 5.3 and latest stable is 5.2.9. I am using 5.2.3 on Red Hat Linux. For PDO, check out http://us.php.net/manual/en/book.pdo.php. This Link dont work, I think its not complete since ends with a . (dot) For WebORB check out http://www.themidnightcoders.com/products.html I have downloaded and I think I with a new Ball and Chain which will keep me tied to a place for a while. Well I will be back after few days since Flex data connectivity is a altogether new to us so we try to develop a pilot application and come back again with some issues if any. We have to learn PHP also. I found some good PHP books in local store here which we will buy today. BTW can u suggest some good PHP IDE, if there is any ? Thanks once again and Best Regards Raja
[flexcoders] Re: Create mxml custom component in a actionscript event handler
Thanks Tracy Spratt, The compiler compiles the function regardless of whether it is ever called, If you reference a class that it cannot find it will error. No, if you are using normal classes, then you must have a reference to that class in order for it to be linked in at compile. This is one of the problems the Modules are intended to address. Note, the reference can simply be a variable declaration typed as the class. Well I Found the solution.. Flex compiler's artificial intelligence doesn't link all the imported classes unless those are refered somewhere in the code. So its necessary to refer the class somewhere in the application. So what i did was I declared a dummy variable var frm1:Form1 = null; var frm2:Form2 = null; and it worked like a magic now dynamic creation works like a charm. Please refer to this URL http://jwopitz.wordpress.com/2008/02/21/getdefinitionbyname-trick/ its claimed that this is a elegant way of achieving same result but I could not understand it properly. If possible can u elaborate the technique he has used in ur next post. But I am still more confused about your problem. Let's try again. Can you instantiate Form1 if you wanted to? I think u might have got exact problem from above mentioned text. If possible please comment on what I have done whether its a best practice or not and suggest better alternative. Thanks for interest shown and time spent on me. I feel that I have got another good friend now. Best regards RAJA
[flexcoders] Need Suggestions for database application.
Hello, We are in process of converting a Desktop C/S Database application to web application. Till date we have not developed any web application. We have evaluated Flex as development platform and created a small pilot application without data access and the respective client has admired general features provided by Flex. Now we would like to evaluate data access part of Flex. Now what we need is help on designing data access part of application. Since this is First Adventure for Both of us (Client and We) there is no legacy system so we are starting from scratch. Can somebody suggest how we should proceed so that there are no/minimum problem in production. At present the application being ported to we is written in Delphi with Firebird as Database Engine. Most of the business logic is stored in Stored Procedures and runs on Linux, Win XP, Win 98 as data base servers. We dont mind on time to be taken for development or efforts in developing/implementing but we expect to achieve following goals. 1 The application should be independent of Backend database. i.e. it should be able to use any of Oracle, MS-SQL, MySQL, PostgreSQL, Firebird as backend. 2 The business logic should move from Stored procedures to some middle layer i.e. to Application server. 3 It should be possible to separate application server and database server i.e. application server and Database servers can be at different physical locations or they can reside on same server. 4 the communication between database server-application server and application Server-Client should be secured one or may be encrypted so that man in middle is not able to modify the data To best of our knowledge we have got a rough layout as follows. To start with have spring as application server with hibernate integration for data access. Then Flex application will communicate with application server through BlazeDS. Can somebody suggest us a better way of doing it so that above goals are achieved and efforts are minimised for both development/implementation and maintenance. Thanks for reading this long post and best regards raja
[flexcoders] Re: Can Flex Access Database on different web server than application web server
thanks Tracy Spratt Flex does not access any database directly (except maybe SQLServer, via native http endpoints) You must use a server platform for database integration. .Net, php, ColdFusion, java, etc are popular server tier platforms. yes I am aware of that. We plan to use BlazeDS and Spring on database server. As of today we have not plunged in details of them since we are phase of evaluating Flex for a bit big database application. Flex communicates primarily via the RPC protocols, HTTPService, WebService, and RemoteObject. It does not care where the data resources are physically located. You will need a crossdomain file on the data server. Well, Can u mention how a crossdomain file looks like just for an idea. We are happy to hear that cross domain data access is possible since in the rough layout of application it needs to post data on two different databases as cross branch transactions. Are there any security threats in using cross domain data access ? Thanks Once Again and best regards Raja
[flexcoders] Create mxml custom component in a actionscript event handler
Hello friends, refer following code sniplet /*** private function onItemClick(event:ListEvent):void { if ((event.target as List).selectedIndex == 0 ) { RSP_GenFun.Check_N_Add_MDIWindow(mdiArea, (new Form1()), true); } if ((event.target as List).selectedIndex == 1 ) { RSP_GenFun.Check_N_Add_MDIWindow(mdiArea, (new Form2()), true); } } **/ private function menuSelected(eventObj:MenuTreeSelectionEvent):void { var ClassRef:Class = getDefinitionByName(eventObj.FormName) as Class; mdiArea.windowManager.add(new ClassRef()); } in this code if I remove comment delimiters the code runs fine but with the comments it gives error. The reason I spotted is it could not locate class definitions of Form1 and Form2 mxml custom components. Can somebody guide me how can I achieve this i.e. putting some probably import statement or some other statement. The Form1.MXML and Form2.mxml files are in same directory of application file from which above code is taken Thanks and Best regards Raja
[flexcoders] Re: Create mxml custom component in a actionscript event handler
thanks Tracy Spratt What error? ReferenceError: Error #1065: Variable Form1 is not defined. at global/flash.utils::getDefinitionByName() at MyFirst/menuSelected()[I:\Flex\RSP_TESTS\MyFirst\MyFirst.mxml:31] at MyFirst/___MyFirst_MenuTree1_menuSelected()[I:\Flex\RSP_TESTS\MyFirst\MyFirst.mxml:42] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at MenuTree/menuSelected()[I:\Flex\RSP_TESTS\MyFirst\MenuTree.mxml:52] at MenuTree/___MenuTree_Tree1_itemClick()[I:\Flex\RSP_TESTS\MyFirst\MenuTree.mxml:7] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.controls.listClasses::ListBase/mouseClickHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:9040] at mx.controls::Tree/mouseClickHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:2922] This is what a popup window in browser has printed The browser is firefox, Flex builder 3 and the application is a evaluation pilot one nothing special in it no database connectivity etc. etc. It contains two forms, one custom mxml component with custom event, one custom event class and a general utility functions class. Thanks and best regards Raja
[flexcoders] Re: Is it better easier to learn Flex3 AS3 via a book or videos?
I am also beginer and have just started writing some exercise applications before we take up a project. No database connectivity, no styling/skinning/effects yet. Plain vanila mxml and actionscript application. This is what i followed 1 Lynda Eccential training 2 Total Training video tutorial 3 Flex cookbook the video tutorial made us familiar with flex, installation and configuring flex builder, apache, php, mysql etc. etc. some basic techniques and coding. But after two three revisions of video turials I am finding book to be more informative and parting advanced knowledge. But anyhow IMHO Video tutorials get u get started very fast compared to books. Thanks and best regards Raja
[flexcoders] Re: Create mxml custom component in a actionscript event handler
Thanks Tracy Spratt Have you imported Form1 and Form2? I tried import Form1; but no effect. How a import statement if Form1 and Form2 are in same source directory that of application ? The output directory is bin-debug within the source directory. Project directory is same as source directory. BTW if comments are removed how the code works, what happens when comments are put can u shed some light on these point ? Thanks and Best Regards Raja
[flexcoders] Re: Create mxml custom component in a actionscript event handler
Thanks Tracy Spratt, Ok, what happens if you just try to instantiate a Form1? If the code is not finding this class then you certainly can't proceed. As I have stated in my earlier posts commenting the onItemClick function the Form1 can not be instantiated if I remove comment on onItemClick function Form1 gets instantiated Please refer my First Post in this Thread. I am not understanding what difference it makes when I comment out a unused function. Well to best my guess when Form1 is referred explicitly in onItemClick function the mxml class Form1 is being linked but when I comment onItemClick function Form1 Class is not being linked. Is there any way to Link this Form1 in application so that its available for dynamic Instantiation i.e. without having any explicit reference in main application. Thanks and Best Regards Raja
[flexcoders] Can Flex Access Database on different web server than application web server
Hello, We plan to do as follows We will keep all application files on a web server say www.xxx.com and we would like to keep our database on all together different web server say www.yyy.com which is at different physical location. By doing so can flex application access data ? if yes what are the measures to be taken ? Thanks and best regards Raja
[flexcoders] Modules and RSLs Which is Better for Large Database application
Hello, We are in phase of evaluating Flex for converting a large delphi-Firebird Client Server database desktop application to a Web application. Till date we have written a small pilot application and is accepted by almost everybody. In Second Phase of evaluation a doubt about download time is being tested and to our best judgment combining everything in a monolithic application is going to take longer startup time. To reduce this we studied Modules and RSLs. We would like hear from experienced persons about Modules and RSLs in Large applications. What do u suggest use Modules or/and RSLs ? are there any runtime issues to be taken care in development phase ? Will there be any problems in development process ? A team of 5/6 persons is going to work on this conversion project. Thanks and Best Regards Raja
[flexcoders] Re: Modules and RSLs Which is Better for Large Database application
Thanks Gregor Kiddie, RSLs are only really useful if you are making two or 3 different products and want to share the code between them. For a single product, they offer no discernable value. We actually removed RSLs from our product because they were impacting run-time performance. point is well taken and thanks for sharing experience. Modules are excellent though. They don't only offer significant start up time benefits, they offer loads of additional flexibility. For example... User hasn't paid for a particular feature? Don't deliver the module. yeah this is one of the advantages we havent considered at all now we will plan our modules keeping this in mind. what we plan to do is we will have Panels equivalent to forms in delphi application. In that application we have one src file per form doing on function and its a class derived from TForm it contains controls and validation logic when submitted data is passed to SP in database server and add/update/deletes are performed. many such forms are grouped in to a DLL which we dynamically load when menu option is selected and the required derived class from Tform is created and shown to user How can we do this flex can u give some tips. Thanks once again and best regards Raja
[flexcoders] Re: Modules and RSLs Which is Better for Large Database application
Thanks Gregor Kiddie, Sounds like one of your DLLs is roughly equivalent to a module in terms of what you want to deliver. Just remember that each Flex module is based off a single mx::Module, so if you want to package up several forms in a single module, you'll need to load the module and then swap the forms on that view. Say using a Viewstack. True, We load DLL with loadDLL Api call then create the form by calling a function in that DLL. Sorry though, I don't know Delphi, so I have no idea what TForm does, or what SP is (Server Process?) Well no problem. TForm is a container Class like Panel(the closest equivalent in Flex to best of my knowledge) which has caption, min, max, close buttons in caption area and which can have visual controls may be bound to datasource or plain ones, it has open, close, keypress etc. etc. events. Well delphi is much similar to flex conceptually so for us it took very less time to understand Flex. But it has much stronger visual designer and IDE. But Flex requires much less code compared to delphi. Suppose if I create few panels with few controls in a single src file and put them in a module how can I create one of those panel and put as a child to main forms Canvas or similar container and free it as soon as the panel is closed. For loading module we got some material to read. The loading module, creating panel and adding as child to canvas we want to perform when a menuitem is clicked. Hope u extend ur help in this regard. Somehow learning resources we have does not have this type of information, or otherwise if possible give us links for similar examples. If you want more module info, I posted a bunch of links on modules onto the list recently. can u give me URLs for those posts or month/year of post so that searching will be bit easier. Since I am new to this Group I not that strong in searching messages so i have to adopt straight royal way of searching i.e. reading page by page. Thanks and best regards. Raja
[flexcoders] FlexMDI controlling Tab navigation
hello, I am in processing of evaluating Flex to be used for migrating our Desktop Delphi database applications to WEB. Till Date we found very positive features and have opinion that Flex is suiting our many requirements. Our existing application is composed of many forms and some them remain open simultaneously in a typical practical use of application. We came across FlexMDI and found that this satisfies this requirement but when we press tab key to navigate between controls in a form then it passes through all controls in that window and then it goes to captions buttons and then goes to next window. We would like to restrict this tab navigation to same window and may be CTRL-TAB to switch between different windows. How can we achieve this ? U can think of a typical desktop window behaviour simulation in flex. Thanks and Best Regards