[flexcoders] Re: CRUD generator...
Please look for clear yoolkit http://sourceforge.net/projects/cleartoolkit/ Regards Anatole Tartakovsky --- In flexcoders@yahoogroups.com, Marvin Froeder velo...@... wrote: Hi, Does someone know any CRUD generator tool? I would like to generate CRUDs based on my VOs. VELO
[flexcoders] Re: CRUD generator...
Please look for clear yoolkit http://sourceforge.net/projects/cleartoolkit/ Regards Anatole Tartakovsky --- In flexcoders@yahoogroups.com, Marvin Froeder velo...@... wrote: Hi, Does someone know any CRUD generator tool? I would like to generate CRUDs based on my VOs. VELO
[flexcoders] Re: CRUD generator...
Please look for clear yoolkit http://sourceforge.net/projects/cleartoolkit/ Regards Anatole Tartakovsky --- In flexcoders@yahoogroups.com, Marvin Froeder velo...@... wrote: Hi, Does someone know any CRUD generator tool? I would like to generate CRUDs based on my VOs. VELO
[flexcoders] Re: CRUD generator...
ANT scripts are generated as well when you create project in eclipse - they are actually used by plugin - so you can move them to the build machine with no/minimal changes As far as Framework - it is identical in approach/implementation to DataServices - you can use generated code either within LCDS or with Farata's light framework. Regards, Anatole Tartakovsky --- In flexcoders@yahoogroups.com, Marvin Froeder velo...@... wrote: Well, I found this linkhttp://flexblog.faratasystems.com/?p=322 Still evaluating, but I do prefer something less attached to eclipse, that I could integration into my continuous integration server. http://flexblog.faratasystems.com/?p=322VELO On Mon, May 25, 2009 at 10:01 PM, Tim Rowe tim.r...@... wrote: I've spent the last few minutes following links and reading details on their project page, and I still can't figure out what that project is supposed to do - It says it's an open source framework - great, but a framework for what? If it handles entity persistance (or other features), would it not be an idea that the project summary actually states so somewhere in it's description? (I'm looking for a replacement for FlexORM as it has a few too many problems). *Tim Rowe* *Software Engineer* *carsales.com Ltd* Level 1, 109 Burwood Road Locked Bag Hawthorn VIC 3211 t: 03 9093 8600 (Reception) t: 03 9093 8757 (Direct) f: 03 9093 8697 -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *anatolet *Sent:* Tuesday, 26 May 2009 10:53 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: CRUD generator... Please look for clear yoolkit http://sourceforge.net/projects/cleartoolkit/ Regards Anatole Tartakovsky --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Marvin Froeder velo.br@ wrote: Hi, Does someone know any CRUD generator tool? I would like to generate CRUDs based on my VOs. VELO
[flexcoders] Re: Access the DLL from Flex
Lucio, If you a looking to develop communication piece yourself, you could either implement socket server (accessible form both environments) or LocalConnection implementation as C++ DLL. Socket server might have issues with your clients security, while LocalConnection(based on memory-mapped files and windows locking mechanism) is a bit tricky. The last time the reliable LocalConnection implementation (before AMF protocol was published) took about 2 man*month to develop. If you are looking for ready components, embeddable socket server is probably the only thing you will be able to find. If you want solution already tried with Flex + sample I would suggest to repost the question to weborb group for people experience with Midnight Coders component. Regards, Anatole Tartakovsky Farata Systems --- In flexcoders@yahoogroups.com, Lucio Batistella lucky...@... wrote: OUR Project based in history and real time graphic available for active to exchange. We developed the Application in Adobe Flex Builder 3.0, with ActionScript 3.0, and we are implementing all features necessary. This product will be available within a solution already developed for our customer in C++ and Visual Basic 6.0. This application will be incorporated into the product, AND, we'll generate a SWF that will monitor implementation of the executable files and will be copy on the client machine. The question is that we are not finding solutions related to the integration of Flex with Visual Basic (DLL), for data access. We performed tests using VBScript withinthe Flex (ActionScript), but could not access the DLL from Flex. We also tried to access a javascript function where it access the DLL, but the send-box of the Flash player blocks access.
[flexcoders] Re: Advanced DataGrid / Destination Aware intros tight coupling?
Hello, I am one of few authors to blame for this throwback in the last century approach to the programming. I would like to offer some explanation of what I personally tried to achieve with chapters 6,7,8 and 11 - you might get better picture if you skimp them in that order. First of all, thank you Matt for clarifying that Cairngorm is not the only solution and is not an approved method to solve all worlds problems. It really helps, as at this point with so many new Flex developers Cairngorm becomes what people learn INSTEAD of FLEX. A lot of veterans lately were discussing the impact of law of leaky abstractions (http://www.joelonsoftware.com/articles/LeakyAbstractions.html and http://www.joelonsoftware.com/articles/LordPalmerston.html) and explaining to the new programmers on what they HAVE to learn and what is optional becomes important. Second, if you do not have DB driven application that can be automated or have complex data ill suited for DataGrid, you DO NOT HAVE TO use destination aware option. Put in your XML dataProvider, skip 2 pages and enjoy the rest of the chapter. However, if like most of enterprise developers your data originates and ends up in relational databases, try to put chapter 6, 7 and 11 together. Now take your Cairngorm application that populates and maintains data in grid format and compare it to the approach in the book. You will notice that all your server code is generated, your commands are not needed as they are replaced with arraycollections that maintain state and demistify dataservices automation while giving you complete control. With the newer versions of daoFlex (chapters were actually written in the summer of last year) you get DataForms on the same foundation so there is solid platform for all your data aware controls. With model, commands, data beans and persistence annihilated you now have to make tough decisions. OK, I have generated code that just works by itself. Should I repackage it in Cairngorm-style framework for benefits of loose coupling? Here is the part where believe system kicks in. IMHO, DataGrid is loosely binded component by itself. It could care less of the beans/DTOs you are going to feed it as long as it can find the fields it needs - and when it can't, it is not going to complain either. As long as presentation objects are supporting loose coupling there is very little benefit of loosing it ;-). Here is a bonus section in the book on decoupling that most people overlook. Go to the end of chapter 8 - it talks about decoupling objects from metadata/resources. If you skipped it here is the brief version - most of the properties that constitute business values - name of lookup/key fields, lists of options, etc. If you break them into CSS analogs that would allow you to bundle certain sets together - you can indeed provide resource driven business customization the same way CSS drives look-and-feel. There is one area that is not addressed in depth in the book - primarily due to the book space and time constraints - and that is business part of the model - computed fields, validations and such. I will try to make separate posting on the subject with the workable approach that offers flexibility and very little coding - hopefully in more reasonable daytime. Sincerely, Anatole Tartakovsky --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: RE Cairngorm, a few people have brought this up to me so I want to get this out there. Cairngorm is great for many folks and many kinds of apps, and we have obviously found success with it in Adobe Consulting (note, not the product team). However no single tool fits all occasions and Cairngorm certainly doesn't solve all problems. I would never recommend anyone use Cairngorm as they're getting started with Flex, I think there are too many concepts within the Flex framework that you need to understand on their own before you bring in more architectures. So please make sure you understand the Flex fundamentals before trying to learn Cairngorm. Now as Tom says, for large apps Cairngorm can prove useful. But it isn't the only way to do things and it certainly isn't the only Adobe approved way of doing things. We don't have an approved method. Some folks want us to approve something, other folks don't want us to approve anything because they think it stifles innovation within the community. I'm not sure where I stand on that, but for now Cairngorm is something that Adobe Consulting uses, and that a lot of the community uses, but it isn't the only valid approach. Matt -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Chiverton Sent: Thursday, March 22, 2007 6:30 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Advanced DataGrid / Destination Aware intros tight coupling? On Thursday 22 Mar 2007, lostinrecursion wrote: Thanks Tom. As I go through the book, I am seeing more
[flexcoders] Re: Advanced DataGrid / Destination Aware intros tight coupling?
Douglas, If I remember it correctly, in daoFlex you can specify customization method/class. It causes 2 things: 1. Adds optional String parameter to the signature - usually xml or pipe separated information for query by example type of modifications to your employee query. 2. Transfers original sql + additional param to your method along with the rest of the parameters. Makes very comfortable way to generalize query on any field[s]. Also, make sure you look at dao.xsl in the templates - that also might give you some ideas. Sincerely, Anatole --- In flexcoders@yahoogroups.com, Douglas Knudsen [EMAIL PROTECTED] wrote: me2. Built a employee search component to search through our DB of 20,000+ employees. I wanted this component to be a 'drop in and work' component existing on it on, thus the RO calls and such are inside it. DK On 3/22/07, maury.sword [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, lostinrecursion k.silans@ wrote: Evening folks, I finished reading a chapter in the new book, RIAs with Flex and Java. Specifically, I was reading Chapter 11: Advanced Datagrid which introduces the concept of a destination aware component which contains calls to a remote object embedded in the extended component's MXML code. Although the destination and method are passed to the component in compile time attributes, this smells of not only tight coupling of components - but totally ignoring good OOP practice and mixing the business and presentation tiers. Add to that the fact that now the dataProvider can only have the one view, the actual grid to which it is set. Can someone point out what I am missing here or make any points why my thoughts are incorrect? So far, it's a great book but that chapter really threw me off. -Kenny/LIR I'm not sure that's that's ignoring good OOP practice but it certainly does mix the business and presentation tiers. I have been doing this since Flex 1.5 for the ComboBox, List, DataGrid and Tree components. I first extended each these to create generic components that implement Flash Remoting, some standard contextmenus, drag and drop, security/privilege checking and dispatch events when remoting calls return. Then I extend these and point the RemoteObject source to the specific CFC that retrieves the data from the database. For instance I have a RemotingComboBase class that extends the ComboBox class and I have an EmployeeComboBox class that extends the RemotingComboBase. I have several applications that need to use an EmployeeComboBox, so when I need one I just have to drag it onto the form and go on to the next component. I also have an EmployeeList class when I want to display a list of employees. Both of these components have their RemoteObject source pointed at the same CFC. Obviously if I'm using both of these components on the same form I am retrieving and storing this information twice but it's worth it to me for the ease and speed of development that I've gained. Also I don't normally have the need to display the same data in different views within the same application. I don't view this as much different than the Flex example of a StateComboBox that always displays a list of hardcoded US states. Maury -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Re: Advanced DataGrid / Destination Aware intros tight coupling?
Maury, Please take a look @ the subchapter on resources (somewhere close to the end of chapter 8 - did not get my copy of the book with real page numbers yet). Basically it talks about moving destination part along with key columns and some other properties into separate class - there you can provide caching and notifications a la runtime styles - only on the properties/model level. Regards, Anatole Tartakovsky --- In flexcoders@yahoogroups.com, maury.sword [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, lostinrecursion k.silans@ wrote: Evening folks, I finished reading a chapter in the new book, RIAs with Flex and Java. Specifically, I was reading Chapter 11: Advanced Datagrid which introduces the concept of a destination aware component which contains calls to a remote object embedded in the extended component's MXML code. Although the destination and method are passed to the component in compile time attributes, this smells of not only tight coupling of components - but totally ignoring good OOP practice and mixing the business and presentation tiers. Add to that the fact that now the dataProvider can only have the one view, the actual grid to which it is set. Can someone point out what I am missing here or make any points why my thoughts are incorrect? So far, it's a great book but that chapter really threw me off. -Kenny/LIR I'm not sure that's that's ignoring good OOP practice but it certainly does mix the business and presentation tiers. I have been doing this since Flex 1.5 for the ComboBox, List, DataGrid and Tree components. I first extended each these to create generic components that implement Flash Remoting, some standard contextmenus, drag and drop, security/privilege checking and dispatch events when remoting calls return. Then I extend these and point the RemoteObject source to the specific CFC that retrieves the data from the database. For instance I have a RemotingComboBase class that extends the ComboBox class and I have an EmployeeComboBox class that extends the RemotingComboBase. I have several applications that need to use an EmployeeComboBox, so when I need one I just have to drag it onto the form and go on to the next component. I also have an EmployeeList class when I want to display a list of employees. Both of these components have their RemoteObject source pointed at the same CFC. Obviously if I'm using both of these components on the same form I am retrieving and storing this information twice but it's worth it to me for the ease and speed of development that I've gained. Also I don't normally have the need to display the same data in different views within the same application. I don't view this as much different than the Flex example of a StateComboBox that always displays a list of hardcoded US states. Maury
[flexcoders] Re: Updating the data back to database
Partha, The point of the original posting is that application developers do not need to write tons of code you want to see - it is generated or written in high-level objects used by framework. Here how it works:Step 1. Youwrite SQL and method name so it can be used by doclet engine:package com.cti.composition;import java.sql.SQLException;/*** @xmlsp:webservice* pool=dbPool**/public interface Employee{/*** @xmlsp:method* scope=public* sql=:: select * from EMPLOYEE* ::* type=bean(EmployeeVO[])* updatable=true**/public Object getEmployees() throws SQLException;}Step 2. Run build or integrated doclet in Eclipse to generate the files. Usual ratio is somewhat 100 (generated statements) to 1 (lines in manually writtenSQL) - that accounts for 50% of the time savings for RAD. Other 50% are coming from bug-free code as oppose to manually written one. You should get those files out:Grid MXML for testing/cut and paste in your application?xml version="1.0" encoding="UTF-8"?mx:Application xmlns:common="common.*" xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FF" horizontalAlign="left" styleName="plain"!--XDataGrid allows you to maintain state on the client (Flex 1.5/2.0) as well as talk to the server automatically --common:XDataGrid id="dg" editable="true" multipleSelection="false" width="100%" height="400" retrieveMethod="getEmployees" remoteObject="com.cti.composition.EmployeeImpl" itemClass="{com.cti.composition.EmployeeVO}"common:columnsmx:Arraycommon:XDataGridColumn columnName="EMP_ID" headerText="Emp Id" editable="false"/common:XDataGridColumn columnName="MANAGER_ID" headerText="Manager Id" editable="true"/common:XDataGridColumn columnName="EMP_FNAME" headerText="Emp Fname" editable="true"/common:XDataGridColumn columnName="EMP_LNAME" headerText="Emp Lname" editable="true"/common:XDataGridColumn columnName="DEPT_ID" headerText="Dept Id" editable="true"/common:XDataGridColumn columnName="STREET" headerText="Street" editable="true"/common:XDataGridColumn columnName="CITY" headerText="City" editable="true"/common:XDataGridColumn columnName="STATE" headerText="State" editable="true"/common:XDataGridColumn columnName="ZIP_CODE" headerText="Zip Code" editable="true"/common:XDataGridColumn columnName="PHONE" headerText="Phone" editable="true"/common:XDataGridColumn columnName="STATUS" headerText="Status" editable="true"/common:XDataGridColumn columnName="SS_NUMBER" headerText="Ss Number" editable="true"/common:XDataGridColumn columnName="SALARY" headerText="Salary" editable="true"/common:XDataGridColumn columnName="START_DATE" headerText="Start Date" editable="true" cellRenderer="common.RenderEditableDate" width="102" resizable="false"/common:XDataGridColumn columnName="TERMINATION_DATE" headerText="Termination Date" editable="true" cellRenderer="common.RenderEditableDate" width="102" resizable="false"/common:XDataGridColumn columnName="BIRTH_DATE" headerText="Birth Date" editable="true" cellRenderer="common.RenderEditableDate" width="102" resizable="false"/common:XDataGridColumn columnName="BENE_HEALTH_INS" headerText="Bene Health Ins" editable="true"/common:XDataGridColumn columnName="BENE_LIFE_INS" headerText="Bene Life Ins" editable="true"/common:XDataGridColumn columnName="BENE_DAY_CARE" headerText="Bene Day Care" editable="true"/common:XDataGridColumn columnName="SEX" headerText="Sex" editable="true"//mx:Array/common:columns/common:XDataGridcommon:TestXDataGrid dataGrid="{dg}" itemClass="{com.cti.composition.EmployeeVO}"/mx:HRule width="100%"/mx:Canvas label="getEmployees()" width="280" height="44"mx:Button label="Retrieve" x="20" y="10" click="dg.retrieve();"/mx:Button label="Update" x="140" y="10" click="dg.update();"//mx:Canvasmx:Scriptvar dummy_getEmployees:com.cti.composition.EmployeeVO = null; /* init ActionScript proxies *//mx:Script/mx:ApplicationActionScript bean:/* Automatically generated file. */dynamic class com.cti.composition.EmployeeVO{public var _nulls:String; // internalspublic var EMP_ID : Number;public var MANAGER_ID : Number;public var EMP_FNAME : String;public var EMP_LNAME : String;public var DEPT_ID : Number;public var STREET : String;public var CITY : String;public var STATE : String;public var ZIP_CODE : String;public var PHONE : String;public var STATUS : String;public var SS_NUMBER : String;public var SALARY : Number;public var START_DATE : Date;public var TERMINATION_DATE : Date;public var BIRTH_DATE : Date;public var BENE_HEALTH_INS : String;public var BENE_LIFE_INS : String;public var BENE_DAY_CARE : String;public var SEX : String;static var registered = Object.registerClass("com.cti.composition.EmployeeVO", com.cti.composition.EmployeeVO);public function __typeName():String { return "com.cti.composition.EmployeeVO"; }public function toString():String { return "com.cti.composition.EmployeeVO { "+" EMP_ID:"+EMP_ID+" MANAGER_ID:"+MANAGER_ID+" EMP_FNAME:"+EMP_FNAME+" EMP_LNAME:"+EMP_LNAME+" DEPT_ID:"+DEPT_ID+" STREET:"+STREET+" CITY:"+CITY+" STATE:"+STATE+"
[flexcoders] Re: Cellrenderer For ComboBox
OK, just because you already stated that you looked at the source code, I hope posting the code here is not going to be such a big offence - I recall few people exchanging messages on how you can do it with debugger, etc. I am going to post a little bit more generic code - allowing you to show DATAGRID as a dropdown. Also, please note that this code is targeted toward wider audience allowing you to define cellrenderers along with other column attributes via mxml as well. Finally, this is going to show you the end of very long rope - please use caution not to explore it to much as it is going to become a problem during migration to Flex 2. Step 1. Create custom ComboBox and define __columns property on it / import mx.controls.ComboBox; import mx.controls.DataGrid; import mx.controls.gridclasses.DataGridColumn; import mx.core.UIObject; import mx.effects.Tween; import mx.managers.PopUpManager; import mx.styles.CSSStyleSheet; class common.DGComboBox extends ComboBox { var __columns:Array; var showHeaders :Boolean = false; [Inspectable(arrayType=DataGridColumn, category=Other, verbose=1)] [ChangeEvent(columnsChanged)] function get columns() : Array { return __columns; } function set columns(a:Array) { __columns = a; setDropdownColumns(); dispatchEvent({type:columnsChanged}); } function setDropdownColumns() { if (__dropdown == undefined __columns != undefined) return; __dropdown.columns = __columns; } //-- Creation (dropdown) --- function getDropdown() : Object { if (!initialized) return undefined; if (!hasDropdown()) { var o = new Object(); o.styleName = this; var nonInheritingStyleSheet:CSSStyleSheet = new CSSStyleSheet(); // preilly: the following line is a workaround for what seems like a AS // compiler bug. var dropdownBorderStyle = this.dropdownBorderStyle; if (dropdownBorderStyle != undefined) { o.borderStyle = dropdownBorderStyle; nonInheritingStyleSheet.factory = function() { return { borderStyle: dropdownBorderStyle, selectionDuration: 0, cornerRadius: 5 }; }; } else { nonInheritingStyleSheet.factory = function() { return { selectionDuration: 0, cornerRadius: 5 }; }; } o.nonInheritingStyleSheet = nonInheritingStyleSheet; o.visible = false; // Don't display a tween when the selection changes. The dropdown // menu is about to appear anyway, and other processing can make // the tween look choppy. o.selectionDuration = 0; // THIS IS OVERRIDE - BEWARE o.showHeaders = showHeaders; __dropdown = PopUpManager.createPopUp(this, DataGrid, false, o, true); // Have to destroy the List Box's mask since we also // have a mask and masks inside masks don't work on Win XP. Player Bug. // Make sure this is done before calling super.createChildren(). __dropdown.scroller.mask.removeMovieClip(); // Set up a data provider in case one doesn't yet exist, so we can share it with the dropdown listbox. if (dataProvider == undefined) dataProvider = new Array(); __dropdown.setDataProvider(dataProvider); __dropdown.selectMultiple = false; __dropdown.rowCount = rowCount; __dropdown.width = __dropdownWidth; __dropdown.selectedIndex = selectedIndex; __dropdown.vScrollPolicy = auto; __dropdown.labelField = __labelField; __dropdown.labelFunction = __labelFunction; __dropdown.owner = this; __dropdown.changeHandler = _changeHandler; __dropdown.addEventHandler(change); __dropdown.scrollHandler = _scrollHandler; __dropdown.addEventHandler(scroll);