What are the main differences between the popular web frameworks?

前端 未结 3 660
你的背包
你的背包 2021-02-08 05:44

There are lots of web application frameworks available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses, and uniqu

3条回答
  •  别跟我提以往
    2021-02-08 06:42

    Django vs Struts.

    Development speed and convenience.

    Django - up and running in the time required to build the model (in Python), define the Admin mappings (2-3 lines of code per model class) and create HTML templates to work with the default master-detail views.

    Struts - have to define a database in SQL, then define ORM mappings in iBatis. Then define, test and build various application components, using action classes and JSP template pages. Oh, and I need to define EJB's to move data from application to JSP's. It's all got to compile and I've got to work through numerous details just to get something that fits the compile rules.

    Barriers to entry - both in terms of developer training, and of infrastructure needed

    Constant across all frameworks and languages. This is pretty much a don't care item. No language or framework is inherently easy to train. All web frameworks have similar infrastructure requirements.

    Lock-in - how much code could you keep if you had to switch frameworks?

    This doesn't make a lot of sense. If you switch from Tomcat to any of the Tomcat derivatives, you can preserve a lot of Java code. Otherwise, you generally don't preserve much code when you switch framework.

    Flexibility - does the framework dictate your architecture or design? (Whether that would be a good or bad thing is probably best left to a separate discussion.)

    Actually, that's not a separate discussion. That's the point. Frameworks dictate your architecture -- and that's a good thing. Indeed, the framework is code you don't have to write, test, debug or support. It's a good thing that your application is confined by the framework to a proven, workable structure.

    Performance, scalability, and stability - obviously depending on the developers!

    Performance is language (not framework). It's design. To an extent, its also implementation configuration.

    Scalability is framework (not language). It's design and configuration.

    Stability is across the board: OS, language, framework, design, programming, QA and implementation configuration.

提交回复
热议问题