Re: [flexcoders] When to use the include directive?
Thanks for the responses everyone. It's an interesting question that I had posed to myself... and at the time, I couldn't come up with any particular reason when to use it. I have seen it used in the framework, and I agree that there is a place for it. But I do wish some developers never knew it existed. Especially the one's who wrote this "framework" I'm forced to use. Thanks again everyone! Cheers, Nate On Wed, Jan 14, 2009 at 3:23 PM, Josh McDonald wrote: > FWIW, I use include *all the time* when I need to implement > IEventDispatcher but I'm extending something that's not an IEventDispatcher > (Proxy, I'm looking at you). > > -Josh > > 2009/1/14 Tom Chiverton > >> On Tuesday 13 Jan 2009, Nate Beck wrote: >> > is an "include Header.as" statement that has 30 include statements >> within >> > it. >> >> Sounds like someone used to programing in C. >> >> > To give a datagrid additional functionality, you give it an >> > id="myDataGrid" >> >> Eww. >> >> > I just don't see a good use for the include statement anymore. In my >> > opinion, it just promotes bad programming practices. >> >> It was handy, up until I came across Code Behind, to separate layout from >> code. >> >> -- >> Tom Chiverton >> Helping to completely e-enable granular e-services >> >> >> >> This email is sent for and on behalf of Halliwells LLP. >> >> Halliwells LLP is a limited liability partnership registered in England >> and Wales under registered number OC307980 whose registered office address >> is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. >> A list of members is available for inspection at the registered office >> together with a list of those non members who are referred to as partners. >> We use the word ?partner? to refer to a member of the LLP, or an employee or >> consultant with equivalent standing and qualifications. Regulated by the >> Solicitors Regulation Authority. >> >> CONFIDENTIALITY >> >> This email is intended only for the use of the addressee named above and >> may be confidential or legally privileged. If you are not the addressee you >> must not read it and must not use any information contained in nor copy it >> nor inform any person other than Halliwells LLP or the addressee of its >> existence or contents. If you have received this email in error please >> delete it and notify Halliwells LLP IT Department on 0870 365 2500. >> >> For more information about Halliwells LLP visit www.halliwells.com. >> > > > > -- > "Therefore, send not to know For whom the bell tolls. It tolls for thee." > > Like the cut of my jib? Check out my Flex blog! > > :: Josh 'G-Funk' McDonald > :: 0437 221 380 :: j...@gfunk007.com > :: http://flex.joshmcdonald.info/ > :: http://twitter.com/sophistifunk > > >
Re: [flexcoders] When to use the include directive?
FWIW, I use include *all the time* when I need to implement IEventDispatcher but I'm extending something that's not an IEventDispatcher (Proxy, I'm looking at you). -Josh 2009/1/14 Tom Chiverton > On Tuesday 13 Jan 2009, Nate Beck wrote: > > is an "include Header.as" statement that has 30 include statements within > > it. > > Sounds like someone used to programing in C. > > > To give a datagrid additional functionality, you give it an > > id="myDataGrid" > > Eww. > > > I just don't see a good use for the include statement anymore. In my > > opinion, it just promotes bad programming practices. > > It was handy, up until I came across Code Behind, to separate layout from > code. > > -- > Tom Chiverton > Helping to completely e-enable granular e-services > > > > This email is sent for and on behalf of Halliwells LLP. > > Halliwells LLP is a limited liability partnership registered in England and > Wales under registered number OC307980 whose registered office address is at > Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list > of members is available for inspection at the registered office together > with a list of those non members who are referred to as partners. We use the > word ?partner? to refer to a member of the LLP, or an employee or consultant > with equivalent standing and qualifications. Regulated by the Solicitors > Regulation Authority. > > CONFIDENTIALITY > > This email is intended only for the use of the addressee named above and > may be confidential or legally privileged. If you are not the addressee you > must not read it and must not use any information contained in nor copy it > nor inform any person other than Halliwells LLP or the addressee of its > existence or contents. If you have received this email in error please > delete it and notify Halliwells LLP IT Department on 0870 365 2500. > > For more information about Halliwells LLP visit www.halliwells.com. > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] When to use the include directive?
On Tuesday 13 Jan 2009, Nate Beck wrote: > is an "include Header.as" statement that has 30 include statements within > it. Sounds like someone used to programing in C. > To give a datagrid additional functionality, you give it an > id="myDataGrid" Eww. > I just don't see a good use for the include statement anymore. In my > opinion, it just promotes bad programming practices. It was handy, up until I came across Code Behind, to separate layout from code. -- Tom Chiverton Helping to completely e-enable granular e-services This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] When to use the include directive?
On Tue, Jan 13, 2009 at 10:19 PM, Nate Beck wrote: > I just wanted to ping everyone and get their opinion on something. Why > would anyone ever want to use the include directive? I've recently been > working on poorly designed project where at the top of every module there is > an "include Header.as" statement that has 30 include statements within it. > To give a datagrid additional functionality, you give it an > id="myDataGrid", and the include statement takes care of the rest. It's > really bad. > I just don't see a good use for the include statement anymore. In my > opinion, it just promotes bad programming practices. > I mean, can't everything be taken care of using OOP methodologies? The include statement is basically for static includes (compile time). I agree that using include in AS3 is like using C-style macros in C++ (instead of inline functions, class inheritance, and such). But sometimes that's just what you need. The Flex framework, for instance, uses include statements to include common style metadata into various components. Manish
Re: [flexcoders] When to use the include directive?
I don't think that forcing people to follow OOP is necessarly the best idea. I'd imagine that a lot of the people who use flex come from more of a web presentation background then any other background and don't necessarily know the best practices. The thing about the include statement is that it allows for seperation for scripts and the MXML content. Now most people will be probably exending dispaly classes using mxml because its is more intuative. Especially as bindings work differently for .as classes. I know it isn't necessary to extend these classes using mxml but certainly for composite components it seems the easiest way to do things. Where would you create the children in an extended actionscript class? In the constructor by overriding some obscure methods, that don't even appear in the AS doc of the class your looking at? I therfore think that import is important. However I think its open to abuse. Its bad practice certainly but it has a place in RIA in my opinion. Regards, Wesley On Tue, Jan 13, 2009 at 5:49 PM, Nate Beck wrote: > Hey list, > I just wanted to ping everyone and get their opinion on something. Why > would anyone ever want to use the include directive? I've recently been > working on poorly designed project where at the top of every module there is > an "include Header.as" statement that has 30 include statements within it. > To give a datagrid additional functionality, you give it an > id="myDataGrid", and the include statement takes care of the rest. It's > really bad. > > I just don't see a good use for the include statement anymore. In my > opinion, it just promotes bad programming practices. > > I mean, can't everything be taken care of using OOP methodologies? > Thoughts? > > -- > > Cheers, > Nate > > http://blog.natebeck.net > > > >
[flexcoders] When to use the include directive?
Hey list, I just wanted to ping everyone and get their opinion on something. Why would anyone ever want to use the include directive? I've recently been working on poorly designed project where at the top of every module there is an "include Header.as" statement that has 30 include statements within it. To give a datagrid additional functionality, you give it an id="myDataGrid", and the include statement takes care of the rest. It's really bad. I just don't see a good use for the include statement anymore. In my opinion, it just promotes bad programming practices. I mean, can't everything be taken care of using OOP methodologies? Thoughts? -- Cheers, Nate http://blog.natebeck.net