I used to have an adapters package in the view package, but then i began to see these as being also of use outside the view
for example if I wanted/ needed to adapt an instance to send to the server, or just to have to morph it into something else, so I created
a separate adapters package that sits at the same level as view or model.
To me, something like this very much comes down to personal style, just ask yourself the questions:
does it make sense to me being where it is
will it make sense to others where the packge is.
do i find it annoying where it is (if yes, then it should probably be refactored somewhere)
On 8/1/06,
flxcoder <[EMAIL PROTECTED]> wrote:
Thanks - that works.
Now for package management, I have these scripts in the view folder,
is this where you would recommend to keep such files are create a new
scripts folder where such static functions can be stored?
Thanks.
--- In flexcoders@yahoogroups.com, "Paul BH" <[EMAIL PROTECTED]> wrote:
>
> what you might want to look at is creating an adapter class to
format your
> data, so it would be something like:
>
>
> myList:XMLList = myAdapter.adaptXML(xml)
>
> then in myAdapter
>
> public static function adaptXML(inXML:XML):XMLList{
> //do ugly stuff
> }
>> On 8/1/06, flxcoder <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a component that gets called in the view:component say.
> >
> > Now this component has some functions that do operations to
format the
> > data in the format that is required to display on screen. These
> > functions are quite large and ugly. I want to move them to a
separate
> > scripts.as file, so they could be a little out of sight and also
> > reusable.
> >
> > Any ideas how I can go about doing this.
> > 1. How would I get access to scripts.as function
returnXMLList(xml) say.
> > Is it something like
> > import view.scripts;
> >
> > Scripts scripts = new Scripts();
> > scripts.returnXMLList(xml);
> >
> > Does this make sense?
> >
> > Thanks.
> >
> >
> >
>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to