Your opinion - what does a web framework need

Started by hilti, September 17, 2009, 12:38:12 PM

Previous topic - Next topic

hilti

During the last weeks I analyzed a lot of web frameworks like Rails, Django, Merb or CodeIgniter. When running some sample applications it felt like carrying a lot of unneeded things around.



My first contact with rails seems like: WOW - I love that thing! You know I was impressed by this "writing a blog app in 20 minutes" screencast. Just a few days later I stucked in my first rails deployment.



Merb seems to be lighter. quicker. But not as easy to learn as Rails.



CodeIgniter is a really cool framework for PHP. Lightweight. Quick and it comes with a very good user guide. But in some cases it feels not elegant, e.g. working on lists or arrays.



Now I'd like to know: what Do You think a web framework needs?
--()o Dragonfly web framework for newLISP

http://dragonfly.apptruck.de\">http://dragonfly.apptruck.de

hilti

#1
No one? ;-)
--()o Dragonfly web framework for newLISP

http://dragonfly.apptruck.de\">http://dragonfly.apptruck.de

cormullion

#2
I don't know really. I've not used any other web frameworks before, I just write applications that run on the web.



I can imagine that the more applications they try to allow or anticipate, the more complex they'd be to set up. Is it possible to write a "web framework" that allows you to easily build either an e-commerce site or a wiki. or a blog or a catalog, with just a few adjustments? Perhaps it is, but how complex does the framework get...



What does the web developer community consider a "web framework" to consist of?

Jeff

#3
Here are the ones that are most important to me:


  • The ability to write modular, pluggable applications

    SQL generator (if not a full ORM, then some way of abstracting the SQL and parameter escaping out of complex queries)

    Automated form management with validation

    Programmatic administration or an easy way to build administrative forms

    Multi-site management

    Simple export to common formats (rss, atom, etc)


Things I don't think are important:


  • MVC

    Any sort of XML-based configuration

    Command-line utilities (except perhaps to generate database structure)
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

Tim Johnson

#4
I've been doing web application programming since 1996. I've written a number of

CGI interfaces for C,C++, rebol, newlisp and python. And I've developed and am

developing my own frameworks. Both server-side and client-side.

 Having said that - I would recommend a clever

younger person starting out to check out a number of frameworks.



Unlike Jeff I love the command line and have a number of command-line utilities to

support web applications, including a FTP/synchronizer written in newlisp that I

run from both the bash shell and from vim. The linux command line is much more

flexible in general than command.com or cmd.exe.



One of my concerns about frameworks is that they can be a bureacracy to which I

might not want to conform. Here's a simple example: If you have a form and a checkbox

is _not_ checked, that element name is _not_ sent. I don't like that. Another is the

lack of  transmission of submit buttons. What if you have a form with more than one

submit button and you want the form action to 'take action' based on which button is

clicked.

You just could be SOL ... thus I've written a complete DOM manager in javascript and

am testing against all browser I can find. jQuery doesn't work in konqueror. Mine

will.

JMTCW

tim
Programmer since 1987. Unix environment.

itistoday

#5
This is what I think needs to be in a good web framework, some of which I have newLISP source code for (drop me a line if you need it, some of it's good, some of it's a bunch of hacks).



[*] Ability to not just handle GET/POST/PUT requests, but to create such requests on the server so that you can send them to other servers. This allows a web framework to interact with other services like twitter, paypal, etc.
  • [*] Advanced support for different content-types and binary data in POST/PUT. You should be able to create a form to submit a file, or directly send a file to the script (without a form, by calling the URL directly).

  • [*] RESTful design, to easily be able to create RESTful URLs, for both end-users (i.e. websites) and backend APIs. This must be done in a generic fashion, i.e. through the use of modules, where each '/' in the URL causes the rest of the URL to be sent to the next appropriate module down the line, and for these modules to be able to handle parsing GET arguments in the URL. Example:
    GET mysite.com/users/fred/posts?since=1234
    => Root module '/' gets: users/fred/posts&since=1234
    ==> calls module 'users' (which is like a subclass of the root module, has same function to get its part of the URL and pass it along). 'users' knows to read the name after '/' to get that individual module
    ===> a module is called with the user set to fred, its sees it wants its posts,
    ====> the posts module gets the posts for fred, and sees the optional parameter 'since' which restricts it to posts since time 1234
  • [/list]
    Get your Objective newLISP groove on.

    mtvee

    #6
    Since you use the terms "framework" I think a framework should be the minimal possible thing in every way.



    - each layer should be as de-coupled as possible from other layers (controller, views, models, database, sessions)

    - it should not have a strict directory layout

    - it should not use naming conventions and directory layouts to make things "work"

    - it should ask and answer, "what is a PITA about web programming" and nothing more

    - if you can't guess how it works, it's no not right



    imho, rails is not a framework, its a religion (or as Tim said up the page, a bureaucracy), and most so called frameworks are that. Frameworks are (should be) skeletal, simple, obvious and you do have to do some work to make things happen. This gives you the most flex. Rails is cute, cake is cute, etc. Codeigniter is a true framework. I have bent it into a pretzel with ease, rails (et. al.) does not bend.



    If you want something you can hack on, whack on, rails is great, if you want a framework you can innovate on, maintain and service the customer, codeigniter is a very good example of what do to and how to do it.



    I guess what I am saying is I like a code base that is to web coding as like unix is an OS framework, discrete, sensible parts that can work together in any way you feel like glueing them together. Rails (et. al.) feels like windows to me.


    Quote
    CodeIgniter is a really cool framework for PHP. Lightweight. Quick and it comes with a very good user guide. But in some cases it feels not elegant, e.g. working on lists or arrays.


    A list or arrays is all computers can do, everything else is smoke and mirrors mon ami. Funny to make that sound like it's a bad thing in a LISP forum ;)



    BTW, this is my first post I think here, tho I have been lurking for quite some time, so hi all :D

    itistoday

    #7
    QuoteBTW, this is my first post I think here, tho I have been lurking for quite some time, so hi all :D


    Hallo and welcome!


    Quote from: "mtvee"Since you use the terms "framework" I think a framework should be the minimal possible thing in every way.



    - each layer should be as de-coupled as possible from other layers (controller, views, models, database, sessions)

    - it should not have a strict directory layout

    - it should not use naming conventions and directory layouts to make things "work"

    - it should ask and answer, "what is a PITA about web programming" and nothing more

    - if you can't guess how it works, it's no not right



    imho, rails is not a framework, its a religion (or as Tim said up the page, a bureaucracy), and most so called frameworks are that. Frameworks are (should be) skeletal, simple, obvious and you do have to do some work to make things happen. This gives you the most flex. Rails is cute, cake is cute, etc. Codeigniter is a true framework. I have bent it into a pretzel with ease, rails (et. al.) does not bend.


    I agree with you completely, and I think you'll like where we're going with Dragonfly. You can grab the latest unstable changes from mercurial on Dragonfly's google code project site if you can't wait... Keep in mind though right now it's in a state of constant flux and the documentation isn't up-to-date, so don't rely too heavily on what you get from the mercurial repo.
    Get your Objective newLISP groove on.