Grey Line

I have finished “fixes” on some project that was developed by typical J2EE team and needed to made work before it enters official beta. It has been extremely difficult to navigate and resolve and I would like to provide a brief checklist of symptoms you might want to review to see if your project is heading for trouble:

Symptom #1. The sizable project is built very much on Flex framework without layer of UI controls for common business and UI functionality. Typical of shops that think of MXML as another xHTML.

Problem: Impossible to enforce consistent behavior across multiple screens, cumbersome user input, complicated formatting and validation, tons of “cut and paste” spaghetti code and millions of bugs.

Solution: Extend MXML controls into business controls that would make reusable UI elements with ROBUST and SIMPLE interface. Make sure that your controls are perfect to the end-users of your application. Strive for data-driven application programming.

Symptom #2. Conventional J2EE middle tier that does nothing but repackages data for DB/XML communications.

Problem: It usually does something in reality. It might prevent you from using transactional capabilities in database. It can hide errors from the back-end. It might contain bugs. Cause performance degradation and scalability issues.

Solution: Either go directly to the datasource or base your data entry systems on the model with client-centric updates. Provide direct feedback on the errors, transactional control, eliminate duplication and integration problems.

Symptom #3: Cairngorm framework for large application. I am going to get a lot of flame mail on that one.

Problem: Nevertheless, I was saying it 15 years ago, and I say it again – do not use framework unless you build application identical to the one the framework was built for. Unfortunately, RIA area is much wider than old “shopping cart/content management” Web we know of – there is slim chance that any framework will be more of help then a burden unless you indeed are building shopping cart. Framework is not a silver bullet, but rather a way to postpone design stage.

Solution: Start with class libraries. Build and verify reusable components early. You are in object-oriented, event-driven, real-world facing environment that has to be intelligent and friendly to the end-user. Break your application into libraries and modules as early as you can – it will pay off faster then you think.

Symptom 4#: Excessive use of binding.

Problem: You try to see dependencies, and it just never ends. Cycles, breaks, using binding for initialization, wrong timing – you name it. Debugging becomes time consuming and very challenging. As a result – untested code that seems to work.

Solution: Understand the difference between binding, initialization and types of the events you really want to listen to. Handle events locally in the business domain UI components. Do not force system to do more then it needs. In the event driven environment you really want to keep the noise down -especially for large applications.

Symptom 5#: No error handling, no logging statement and assertions in the code.

Problem: I can be wrong here. It is possible that the code is perfect and nothing is going to break ever. Otherwise, you are doomed. Seriously, bringing support phone into your bedroom is not thing you want to do. Postponing the problems after release date will get you in trouble.

Solution: I will blog a bit more next week and make sure we will release some of the internal tools in the circulation this month. There is no excuse not to use logging API and assertion in Flex.

Sincerely,

Anatole Tartakovsky

7 Comments

  1. PaulH said,

    February 17, 2007 @ 12:12 pm

    seems like reasonable advice. btw how are you logging client side? something custom? or have i misunderstood that the logging classes were only good for debug clients? yes, still a cf guy new to flex ;-)

    thanks.

  2. Leif Wells said,

    February 17, 2007 @ 12:27 pm

    “#3 Cairngorm framework for large application” — yeah, I think you should get flamed for that one, but I am not in the mood to get out the lighter fluid… let me just say that I feel that Cairngorm can be used for any type of application.

    “#5 No error handling, no logging statement and assertions in the code” — I preach this a lot, but at the same time I get caught by it, too. The times I do deal with error handling and logging the best is when I am developing the front-end for someone else’s back-end (i.e. it’s not being developed by someone at my company). When I am placed in that situation, I try to be very cautious when exchanging data with the back-end — you never know when someone will be changing code on that back-end and then the front-end will break; and then someone at the client’s office will call to say that the front-end is broken. If I can have an error appear (on or off screen) and log it in the server logs, then no one will be surprised when the error occurs.

  3. anatole tartakovsky said,

    February 18, 2007 @ 12:59 am

    Paul,
    I personally use logger embedded directly in Eclipse ( Yakov blogged on UI/functionality a while back http://flexblog.faratasystems.com/?p=148). The Log classes are independent from the version of player (production/debug). We have a nice UI driven target configurator when we need to get picky about the classes or few preconfigured logging targets for cases like we just want to see innerworkings of the client/server communications. We will be releasing that plugin this week.
    If you can’t wait you can always go to Adobe Flex exchange and look up my old submission with control/viewer – more of Flash era though as it is not based on Flex Logging.
    Thanks,
    Anatole

  4. Jamie Badman said,

    February 19, 2007 @ 12:59 pm

    The only thing I don’t agree with there is the Cairngorm comment – simply because my experience using Cairngorm with large applications has been very positive to date, particularly with V2 – losing the ‘viewHelper’ stuff was a great step forward. What I do feel, however, is that some work is a little more cumbersome using Cairngorm but long term, developing ’similar’ applications (ie those sharing common data – which where I work is most likely to happen) this work will pay off with some nice reusability.

    Jamie.

  5. Jamie Badman said,

    February 19, 2007 @ 1:00 pm

    (when I say ‘cairngorm comment’ I meant the comment in the main article, not the comment about the main article, which mentioned Cairngorm… sorry for any confusion caused! )

  6. anatole tartakovsky said,

    February 20, 2007 @ 5:54 pm

    Jamie,
    There are 2 different things there – reusability of the framework code itself for the application and reusability of your code. Making your code reusable is your own responsibility, and framework should not take credit for it. After all it is just as possible to make not [re]usable code in any framework.

    There are very few applications outside of the domain mentioned in the article that should be singletons based, do not change over time in unexpected way and would not be constrained by Cairngorm. As I said in the blog, selecting framework allows to postpone design process till a lot of development is done – and then there is a slim chance for redesign. If you do design without framework in mind, the applicability of framework becomes an implementation decision, not the other way around.

    Over the years software industry removed big parts – security, styling, business rules, etc in separate layers. That allowed to remove most of the “infrastructure” pieces automated by frameworks outside of the core application development and reduced value of frameworks. Class libraries are well known for “layering” the “last mile” of application development to provide common functionality and structure. Dropping framework over “last mile” works in some hi-rises – but it does not necessarily reduces the amount of handwiring. On the outside, it can severely limit flexibility of the solution.

    Here is what concerns me most. I have seen it quite a few times when the tool vendor’s framework is being pushed to the market. Most of the people getting intoFlex will try any piece of code pushed by Adobe – as sample code or a way to learn how to do things.
    Mere fact that Adobe offers framework means that it will be used – often without the cause. It also means it will be considerered without due dilligence applied to anyone else. Frameworks from primary vendor virtually annihilate a chance for 3rd party developers community – I would expect a lot of familiar faces in Lazlo camp within half year from now. That is just one thing tool maker may never do – or face completely different eco system for the product.

    Sincerely,
    Anatole Tartakovsky

  7. Tom Gonzalez said,

    February 21, 2007 @ 11:29 am

    I actually agree with the assertion that Cairngorm “out-of-the-box” is not a great fit for large complex applications. Specifically due to the reasons Anatole states, you will most likely benefit if you use a framework specific to the type of application you are building, especially for business applications.
    Cairngorm is a great starting point, especially for people unfamilar with design patterns. But once you start to dig deeper into Cairngorm and the patterns being used, you will most likely find that you will want to modify/extend/replace some of the patterns being leveraged to the specific needs of your business applications. In fact some of the patterns being advocated in Cairngrom (front controller) are not really fully leveraged (at least I have not seen Cairngorm apps with mulitple front controllers.)
    Personally one of the greatest benefits I see to Cairngorm are the not the specific design patterns, but the fact it represents a common reference point to developers working across a multitude of projects, once you understand Cairngorm it is much easier to understand the specifics of how a particular application is coded that uses the framework, you don’t have to learn a whole new framework The trade-off with that common reference point, is that you cant be everything to everybody and most likely your specific application (if it has a significant amount of complexity) will benefit from a framework designed/adapted to support the use cases embodied in your app.

    - Tom

RSS feed for comments on this post

canada online pharmacy propecia
free cialis
buy cialis without rx
cheap cialis
viagra quick delivery
levitra overnight shipping
best price cialis without perscription
hydrochlorothiazide cialis
50mg viagra
cialis discount prices
best price cialis
canada levitra
online viagra levitra cialis
cialis pills for sale
indian cialis
cialis free samples
when will viagra be generic?
buy cheap viagra online uk
order generic viagra canada
where can i get cialis
generic viagra online pharmacy
cheap online propecia
propecia from canada
best price for generic viagra
where buy viagra
cialis 5 mg
viagra off internet
alaska viagra doctors
buy viagra online without a prescription
viagra onlines
propecia sales canadian
cialis ottawa pharmacy
cheapest viagra online
online ordering propecia
buy cheap uk viagra
overnight viagra
viagra online buy
buy propecia 5mg
online order viagra overnight delivery
how to buy viagra in canada
propecia discount
cialis daily canada
canada propecia prescription
vardenafil:
cialis next day delivery
order viagra in canada
cialis free delivery
uk cialis sales
buying generic propecia
canada viagra
levitra without prescription
generic viagra australia
cheap cialis from india
buy generic cialis online
online presription for viagra
best viagra and popular in uk

real viagra without prescription
levitra online without prescription
liquid cialis for sale
buy generic cialis online from canada
viagra express delivery
soft gel viagra
buy cialis pill
canadian generic cialis
tablet viagra
100 mg cialis
buy cheapest cialis
propecia for sale online
overnight propecia
viagra price
get cialis online
buy cheap generic cialis
viagra replacement
viagra online in canada
order cialis from canada
prescription needed for cialis
menu:
50mg viagra
viagra for sale online in the uk
cialis canada on line
viagra mail order usa
cialis viagra
viagra 100 mg
cialis for less 20 mg
levitra viagra online
find cheap viagra online
online viagra au
online generic cialis 100 mg
online pharmacy propecia
pfizer viagra no prescription
buy propecia online cheap pharmacy
to buy viagra online
propecia
viagra doses
i want free viagra
buy real viagra online no prescription
viagra for woman
brand viagra professional
sildenafil viagra
cialis now
viagra for less
lowest price for viagra from canada
where to buy cialis cheap
viagra online in canada
canadian healthcare cialis
cialis kanada
cheapest levitra uk
cheapest viagra in uk
no prescription viagra canada
canadian pharmacy cialis no rx
cheapest prices on propecia
viagra samples
cheap discount cialis
viagra tablet weight
low price viagra
viagra canadian pharmacy support
cialis us drug stores
generic cialis next day delivery
viagra canada cheapest
buy propecia online
generic propecia canada
find cialis no prescription required
propecia cialis viagra
cialis strenght mg
lowest-price propecia costs us
discount cialis levitra viagra
buy viagra for women
real cialis online
drugstore best buy generic cialisbuy generic cialis
generic viagra canadian pharmacy
cialis testimonial
propecia generic
viagra how much
buy propecia no prescription
find viagra without prescription
buy generic cialis online
no rx viagra
cialis free delivery
viagra from uk
cheap canadian viagra
buy generic cialis
cheap cialis pills
levitra 10 mg without prescriptions
viagra pfizer canada
cheap viagra for sale
cheap cialis online canada
viagra echeck
cheap cialis online no prescription
propecia orders
cialis without prescription in canada
low cost canadian viagra
viagra/cialis sales
buy cialis without prescription
generic propecia for sale
cheap viagra canada
can i buy viagra in canada
nizagara viagra online
viagra mail order
www.cialis.com
viagra sales online
viagra in china
canadian pharmacy viagra cheap
ordering viagra online
cialis canadian cost
buy viagra online without prescription
viagra with no prescription in britain
find viagra no prescription required
cialis daily canada
cheap brand name cialis
vardenafil generic
buy propecia without a prescription
the best price of viagra
try cialis for free
order cialis in canada
usa cialis women
generic cialis sales
viagra sale
sale of viagra tablets
womens viagra no prescription
di scount 50 mg viagra
buy cialis online australia
cialis online australia
real viagra without a prescription
buy cheapest viagra online
cialis canadian online pharmacy
sale viagra
alternative for viagra
prescription for propecia
buying cheap cialis
viagra order
viagra com
purchase cialis next day delivery
online viagra levitra cialis
professional cialis online
combine cialis and levitra
prices for propecia
real viagra to buy
sildenafil
levitra for sale
cheap order prescription propecia