Slashdot Mirror


Ask Slashdot: How Do You Choose Frameworks That Will Survive?

First time accepted submitter waslap writes "I have a leading role at a small software development company. I am responsible for giving guidance and making decisions on tool usage within the shop. I find the task of choosing frameworks to use within our team, and specifically UI frameworks, exceedingly difficult. A couple of years back my investigation of RIA frameworks lead me to eventually push for Adobe Flex [adobe.com] as the UI framework of choice for our future web development. This was long before anyone would have guessed that Adobe would abandon the Linux version of Flash. I chose Flex mainly for its maturity, wealth of documentation, commercial backing, and the superior abilities of Flash, at a time when HTML 5 was still in the early stages of planning. Conversely, about 15 years ago I made a switch to Qt for desktop applications and it is still around and thriving. I am trying to understand why it was the right choice and the others not. Perhaps Qt's design was done so well that it could not be improved. I'm not sure whether that assessment is accurate. I cannot find a sound decision-tree based on my experiences to assist me in making choices that have staying power. I hope the esteemed Slashdot readers can provide helpful input on the matter. We need a set of fail-safe axioms" Read on for more context. The backing of Adobe, an industry giant, gave me what I later discovered was a false sense of security. I thought that the Flex framework would not get lost in a back alley like so many open source projects. We invested heavily in Flex and were disillusioned a couple of years later when Linux support for Flash was ended. (Linux support is vital for us for reasons outside this discussion.)

I had evaluated Adobe Flex alongside OpenLaszlo, which at the time had the ability to use a DHTML back-end instead of Flash with the flick of a switch. In retrospect, this alone apparently made it a better choice in the long run regardless of its flaky state when I first looked at it.

A similar scenario arose with CodeIgniter, which we chose for getting away from classical spaghetti PHP. CodeIgniter was recently dropped after we've invested a Tesla Model X worth of money into using it. (EllisLab Seeking New Owner for CodeIgniter.)

I am standing at a cross-roads once again as people are pushing Laravel [laravel.com] for PHP, and giving other suggestions. I am scratching my (sore) head and wondering how to prevent eventual failures in the future. It seems there is no way to predict whether a tool will survive.

Even in retrospect, when I consider my decision-making processes, everything was reasonable at the time I made the choices, yet some turned out to be wrong.

17 of 227 comments (clear)

  1. IE6 by ArhcAngel · · Score: 5, Funny

    That thing will be around FOREVER!

    --
    "A person is smart. People are dumb, panicky dangerous animals and you know it." - K
    1. Re:IE6 by homey+of+my+owney · · Score: 4, Insightful

      The problem is you're thinking about it all wrong. The decisions were probably all right at the time. If you think there's a crystal ball that will tell you what the future will bring, you're going to look long and hard. The right decision is right for now. The best you can do is design so that moving to something else is possible instead of painful.

  2. Write your own! by Anonymous Coward · · Score: 5, Insightful

    Depending on what you're doing, you should consider writing your own framework. I love using the one I wrote from scratch 10+ years ago: it's proven, high quality code, there are no secret corners I don't understand, and I know how to fix or modify it to do new things. It's also small and fast because it only needs to solve the problems *I* encounter.

    To anyone who starts preaching the religion of code reuse, I think you're just scared of the unknown ... or not a very good programmer. The sorts of things most people need a "framework" for are so simple that any experienced programmer should be able to do it.

    1. Re:Write your own! by JustinKSU · · Score: 4, Insightful

      Depending on what you're doing, you should consider writing your own framework. I love using the one I wrote from scratch 10+ years ago: it's proven, high quality code, there are no secret corners I don't understand, and I know how to fix or modify it to do new things. It's also small and fast because it only needs to solve the problems *I* encounter.

      To anyone who starts preaching the religion of code reuse, I think you're just scared of the unknown ... or not a very good programmer. The sorts of things most people need a "framework" for are so simple that any experienced programmer should be able to do it.

      This is a challenging option in a corporate environment when you need to hire someone to support said framework after you have left the company unexpectedly.

  3. Practical answer by micahraleigh · · Score: 5, Insightful

    Whatever shows up (significantly) on the hiring boards.

    1. Re:Practical answer by Sarten-X · · Score: 4, Insightful

      This is an insightful answer, and I wish I had mod points now.

      What's on job listings gives a good indication of what other companies have invested in, and what they're going to need support for in the next decade.

      --
      You do not have a moral or legal right to do absolutely anything you want.
  4. Re:Open source survives by Anonymous Coward · · Score: 4, Insightful

    Thanks captain obvious.

    Most folks who want to use a framework have no interest in forking or taking over the project. They want something that works that they can use to save them time. Writing your own from scratch, or maintaining can be a lot of work. That's why some folks are willing to pay for a framework. They defray the cost by only paying for a small portion of the development cost that's shared with others.

    If they can pay someone in-house to fork/maintain, they can probably afford someone to write a customized framework that fits their use-case better than a generic one from either an open or closed source provide.

  5. Hindsight is 20/20 by nitzmahone · · Score: 5, Insightful

    Ultimately, it's nearly impossible to predict market forces and corporate decisions. You made a good choice in both cases based on the information available. There were good communities and significant momentum behind both frameworks at the time. You could post-mortem the decisions endlessly and surely find "signs" that you could use when evaluating for next time, but guaranteed there will be different forces in play when (not if) it happens again. Don't beat yourself up about it, and don't let anyone else, either.

  6. Qt by BreakBad · · Score: 5, Insightful

    Firstly don't design your software around the view. Consider separation of your data structure from your view (MVC architecture), so the view is easier to replace if necessary.

    With that said, I've done extensive development in Flex, openLaszlo, and Qt (PySide). I really enjoy all three, but lean towards Qt development (PySide/PyQt). I tend to get quality (designed, tested, nerd approved) product out much faster. Furthermore I'm not a big fan of the lore that comes with the flash plugin, or browsers in general. Of course I do deal with some cross platform inconsistencies with Qt.

  7. All roads may run ill... by OmniGeek · · Score: 5, Informative

    Been there, done that, wondered "What were we thinking?"

    In selecting an instrumentation framework for a test system, we went through a careful process of defining what was important, listing the pros and cons of each competing option, ran some tests to see if both would run the instruments we needed, ... Aaaand chose the worse option of the two, as events ultimately showed. The choice was evidence-based, reasonable on the basis of what we knew at the time, and suboptimal. The system worked, but we had to do some ugly stuff to make it work.

    Sometimes you just can't outwit Murphy.

    --

    "My strength is as the strength of ten men, for I am wired to the eyeballs on espresso."
    1. Re:All roads may run ill... by superflippy · · Score: 5, Interesting

      I worked on a project this year to completely rewrite a company's signature application from the ground up. Objectively, you'd think that's something you never, ever want to have to do. But, having done it, I think planning a complete overhaul & rewrite into the product's lifecycle is probably a good idea.

      Since the application was first written about a decade ago many, many features have been added with each upgrade. The scope and customer base have expanded. And programming technology has changed hugely during that time.

      Rewriting the entire application is a massive effort, sure. But to truly modernize and streamline it, to get rid of the legacy cruft and take advantage of new tools that didn't exist 10 years ago, I think it's worth it. I also think it would've been wise to do this sooner than we did (though that wasn't possible in this case for business reasons).

      So maybe when you're choosing a framework, don't worry about whether it'll be the right solution forever. Plan to reevaluate your decision every 3-5 years and change frameworks if something better comes along. And, yes, absolutely adopt the MVC model, because then you don't need to replace every part of your application if one becomes obsolete.

      --
      Your fantasies contain the seeds of important concepts.
  8. Flex is a Framework but Flash is a Platform by omnichad · · Score: 4, Insightful

    Perhaps he should have chosen the platform correctly. His problem was choosing the wrong platform, not the wrong framework. It doesn't matter which Flash framework he used if Flash as a platform didn't survive. Might as well have chosen ActiveX if he wanted to put himself in a corner.

  9. Some notes from a seasoned web developer... by Dracolytch · · Score: 5, Insightful

    Truth be told: Tools won't survive. They're notoriously fickle. That said, this is one place where good development practice can really help. Here are some of my guidelines:

    Get off the bleeding edge. Let the youngsters and startups do the bleeding. Learn from them, and use cutting-edge tools after they've matured a bit and have widespread market adoption. Yes, I was late to the jQuery party. No, I don't feel bad about that, as I could have just as easily chosen a failed alternative and been left with something that's damn near impossible to maintain.

    Quality separation of concerns is VITAL for survival. Keep your data store separate from your business logic, and for Knuth's sake, keep your UI the HELL away from everything else, since the UI is the most volatile bit.

    Don't resist your platform: Working on the web? Learn JavaScript. Learn jQuery. Do not use things like SharpKit to turn one platform into another.

    Use things for which the were initially intended, and ignore many of the add-on features. Use databases to store data, not as process engines. Use JavaScript / jQuery for user interface goodness, not your entire application logic.

    APIs / web services / interfaces are your friend... Not just to use, but for you to enforce separation and flexibility.

    --
    This sig has been enciphered with a one-time pad. It could say almost anything.
  10. How To: (Best Guess) by snadrus · · Score: 4, Interesting

    Step 1: Ensure your whole toolchain (libraries, tech, etc) is either open or too commercially essential/purchasable to obsolete (Win32 libs).
        Proof: There are old PHP code that hasn't been touched in 10 years but can be improved easily.
        More proof: When the incompatible Python 3 came out, years went by where the other environment was maintained, and now for most code you run the converter and you're set. No commercial interest would have taken that much care.

    Step 2: What is BIG? _Size-big_ On most resumes for the field big.
        Proof: Oracle's Java interpreter is so insecure that you can't use it in browsers anymore, yet it persists everywhere it can because the engineers know it.

    Step 3: Don't put a lot of dependent code on-top of it
        Frameworks don't last, but neither does the product you're creating. If you don't have much code atop the framework, moving to another will be easy. If it will take a lot of code to make your tech work on a framework, it's better to fail fast. Keep your code atop the framework modular so you know where your integration points are.

    Step 4: Be the integrator.
        If you rely on many small libraries (who doesn't), be sure you are-or-run the glue and not their compatibility. It's more code, but allows you to entirely replace a library that doesn't live up to your changing needs.

    Step 5: Model Linux's ecosystem: standards win since they're multiply-implemented.
        As the most research-able long-lived full system, you see lots of libraries, fickle front-ends, separate long-running processes (daemons) to manage long-running and security-intensive operations. Large programs are broken into smaller programs which are each audit-able, replaceable, reusable, easier to divide labor, etc. Programs with the longest life depends on standard wrappers like the C libraries (which many libraries implement identically-enough) and not on the fickle kernel /proc sources of the C API wrappers source from.

    --
    Science & open-source build trust from peer review. Learn systems you can trust.
    1. Re:How To: (Best Guess) by radtea · · Score: 4, Interesting

      Step 5: Model Linux's ecosystem: standards win since they're multiply-implemented.

      I'm surprised there hasn't been more mention of standards here, although I've had variable success with standards myself, and good success with open non-standard systems.

      Good chioces: Qt, VTK, OpenGL has been extremely long-lived.

      Mediocre choices: XML, wx (I moved to wx from Qt when TrollTech went insane over licensing, but have been slowly migrating back in recent years as wx support has decayed on platforms I'm interested in.)

      Bad choices: XSLT, VRML

      I still use XSLT for some stuff, but VRML was a mistake. Apparently you should stay away from four-letter-acronyms.

      Summary: although I prefer standards over non-standards, open vs closed is the fundamental divider between good vs bad bets. Not everything open will survive, but nothing closed will.

      --
      Blasphemy is a human right. Blasphemophobia kills.
  11. My Criteria by cowdung · · Score: 4, Insightful

    What I've found works well (90% of the time) is:

    1. Look to see if people are hiring for that technology. If you check dice.com or something similar you'll see if companies are invested in it.
    2. Are 3rd parties building "plugins" or "extensions" for it?
    3. Does it make sense to you? Does it adapt well to your needs? Is it well designed?

    While many frameworks may be cool or superior technologically, the sad thing about software is that popularity DOES matter.

  12. Large, old, widely-adopted open source projects. by Lendrick · · Score: 4, Insightful

    There wasn't room in the subject, but I should add "with stable APIs."

    Things like Qt, GTK, OpenJDK, Apache, and PHP, to name a few. These are all so widely used that even if they were abandoned by their current maintainers, someone else would pick them up and at least patch them so that they continue to work. This someone wouldn't have to be you. And yes, I know everyone hates PHP, but the fact is, a lot of the old cruft is still there to ensure backwards compatibility, and much of it has been superseded by cleaner OO interfaces. Much like with Java, they're making a lot of effort to make sure that your old code will continue to work with at most minimal changes, and if you're looking for something that will work for you in the long term, this is really helpful.

    Failing that, your best best bet are expensive proprietary frameworks that will contractually guarantee some term that the framework will be supported.

    After that, big open source projects with less stable APIs (I'm looking at you, Drupal). Drupal is big at the moment, but their nasty habit of breaking everything every two or three years is likely to lead to a fractured community and eventual abandonment of the software unless they can get their APIs stabilized enough that modules will continue to work from release to release. It looks like maybe they're trying to do that, but the pattern thus far is that they haven't. Regardless, if you see a framework with a constantly changing API, you're probably taking more of a risk than you would be if you used a mature product, even if the userbase is large. On the other hand, a large userbase does provide a certain amount of protection against obsolescence. I'm not saying that Drupal is a particularly unsafe framework (I'm quite fond of it myself), just that their development process might lead to intractable problems down the line. Note that GTK and Qt make occasional major API changes, but these are infrequent, and there are so many users of the older versions that linux distros tend to keep the old code around just to make sure things will work.

    After that, probably small open source projects. At least if those are abandoned you'll have access to the code. But before using an open source platform with a small userbase, make sure that you have the time and technical expertise to maintain it yourself if it's abandoned. Most likely, you don't. Also, large, complex open source projects with a small number of users tend (in my experience; I'm sure there are exceptions) to be buggy and poorly documented.

    The worst offenders are free or cheap proprietary frameworks that don't come with any sort of guarantee, like Flex. In those cases, you're at the mercy of the whims of a commercial interest, and when the product you depend on becomes unprofitable, you're cut off with absolutely no recourse.