views:

601

answers:

8

When concerned about creating web applications, I often ask myself how I can make the code easy to read and above all; how to make it easy to maintain. There has been alot of inventions in the last couple of years with probably millions of programmers sharing these thoughts. So, lets test if we can squeeze the distilled knowledge of millions of StackOverflow users for this ultimate answer:

Which language/framework combination in the world right now is the most expressive to do common tasks?

Please provide a simple example of simplicity, add a link to more information about the language, and no more than one entry per language/framework combination.

Specifications:

"Web application" in this context refers to applications that runs on a server and outputs HTML/Javascript/CSS for rendering on a client browser. Any server operating system is ok.

"Language/Framework combination" can for example be like Java+Struts or Java+SpringWeb or Perl+CGI or Java+ZK

"Most expressive" in this context is meant to be minimal code to do common tasks.

"Common tasks" include simple output/input, i.e. form specifying, displaying and processing, as well as simply styling of output.

I am more concerned about minimality than about complete functionality. A decent language design can have great potential even though it is not complete.

+6  A: 

In Python, Django. It combines Python's readability with an expressive template system and a object oriented database access layer. Plus, the documentation is good and there is even an online book.

Django automatically creates an admin site in which all database objects can be editted, though theviews can be customized.

Can't think of an example as usually more of files are involved, making a mess out of this entry. I'll just refer to the tutorial.

extraneon
+6  A: 

Considering the frameworks I use to use, Ruby on Rails was long ago a favorite, due to the natural expressiveness of Ruby and its convention over configuration approach.

Buty, nowadays, these ideas have irrigated the Java world, making framework like Grails and Play! appear.

  • Grails give the Ruby on Rails architecture and point of view a Java basement, making the use of heavyweight frameworks like Spring, Hibernate or Spring security totally transparent to the application developper, which is really cool.
  • Play! Framework tries to make the web application development as straightforward as possible by using many innovative solutions, like direct class reloading, fastening the application development.
Riduidel
Play looks like a promising framework.
Anurag
+2  A: 

Me I would use : Language : php it's flexible, updated, big community, easy to install, lot of tools Framework :

  • xajax (ajax librairy) : easy to use / understand / customize http://xajaxproject.org/

  • smarty (template engine) : the template language is really simple and there isn't to much things it's really a template language http://www.smarty.net/

  • prototype (javascript framework) (or jquery or what you want) : you must use a javascript framework, or you'll die (true story) .http://www.prototypejs.org/

  • any orm tool like doctrine (if you want to go fast and simple).

Database i'd choose mysql : free and good performance so ... Web Server : Apache

remi bourgarel
+5  A: 

ASP.NET MVC + C# + your frameworks of choice

  • C# is a beautiful
  • Great Tooling (Visual Studio) (Plays well with jQuery)
  • It is fast (in the meaning of faster than dynamic languages)
  • Strongly type environment (like Java in opposite to the dynamic languages (Ruby, Python, PHP, etc.))

Downside:

  • Quite fresh (considering open source frameworks and community adoption)

I have experience with PHP, VBScript and little with RoR and this my current perspective. (You can be very productive in all of the current state language/framework combinations)

Robert
Being dynamic does not mean that a language is weakly typed. Java and C# have static types which is different from strong/weak types. C# and Java are static typed with strong types. Ruby is strong typed with dynamic types.
tucaz
It is fast is fairly relative. Java is also very fast; and due to smart caching Python/Django is also fairly fast. That said, if you're deploying on Windows C#/ASP.NET is probably a good choice.
extraneon
I'm surprised it hasn't been mentioned yet: this is the framework upon which StackOverflow is built.
xanadont
+3  A: 

Java + Apache Wicket

  • seperation of concerns
  • no xml
  • component oriented
  • reusability
  • secure
  • high productivity
Anantha Kumaran
+1  A: 

web2py I was using web.py, and have started to use web2py.com

Craig
+1  A: 

I hope it is ok I contribute with an answer to my own question here. And also that it is ok the answer is not a practical answer today. The point by suggesting just ideas, is to spread them, discuss them to gain better ideas.

Eviva is my high potential solution, pending creation. The idea is to code concepts and necessary meta data for the application to run, and put this data into a suitable container. Its preliminary purpose will be as a prototyping modelling tool, but on the long run to cover common and simple systems. Its indented audience includes much more than educated developers.

  • Really minimal code (concept description level)

  • Builds on Java platform (planned)

  • Drop application configuration code into suitable container to achieve different behaviour (different containers give different functions; web container, desktop container, web service container, etc)

Huge drawback today: Not available until it is built

Example code:

Concepts {
  Person: Name, Userid, Password, Phone, Email Address, Birthday(date)
}

Forms {
  Login: Person.Userid, Person.Password
  EditDetails: Person
}

Displays {
  Welcome: "Welcome {Person.Name}! Please visit the newbie area
            if you want a guided tour around here. Other actions
            will be presented to you after you have completed
            your tour. In fact, there will always be a suggestion
            list you can access at your convenient time."
  Main { Menu, Welcome }
}

Flow {
   Login -> Main
   Main -> EditDetails
   EditDetails -> Main
}

Besides this central conceptual configuration, you should be able to provide more details for enterprise module interfaces:

  • CSS stylesheet, used in page layout and presentation, will be used if your container is a web server.

  • SQL mapping file, used for detailed database access

  • Other mapping mechanisms for other systems

Thor
+1  A: 

One or two years ago I'd have said the same as some other guy has answered: Java + wicket. However, in the meantime I discovered something new, something awesome, which heavily blurs the distinction between web apps and rich clients: qooxdoo. Qooxdoo was a refreshing surprise in a long time for me. It allows you to do so many things client side that the server side doesn't matter that much anymore. It even provides readymade connection components to the server for various languages (PHP, Java etc.).

For the server side we developed a solution which we will probably settle on for many projects: qooxdoo's JsonRPC backend for Java, a custom servlet for file uploads, a custom servlet filter for authentication, all wired together via web.xml (and all being application-agnostic components), plus an ordinary spring application wired together via a spring XML context, including some additional but mostly ready made (i.e. not developed by us) components for logging, transaction management, connection pooling and the like. We use services (with the meaning Spring gives to the term) to answer to browser requests, and DAOs (as objects who know to read and write to the database, and abstract the database's relational structure to dumb objects with no logic passed to services). It is definitely not the quintessence of OO programming, but it is definitely manageable, even for complex data structures, very well unit-testable, and, more important, highly scalable and easy on the server, in terms of bandwidth, processor cycles and memory.

This app structure comes with a few bonuses - I'll explain two of them. Given the clear separation between client and server, you have to properly structure your app right from the beginning, or are forced to do so on the way, so anyway you end up with a clear separation of concerns. Given this requirement/effect, besides your architecture being much cleaner (than that of an app not forcing you to do such a separation) and staying this way even after many iterations, the app is much easier comprehensible, and new people can quickly become productive, without much effort - you essentially never have to rewrite, or can do so incrementally . Second, given that the client and the server talk via well defined and standard JSON-RPC requests (even the initial login can be such a request), your app is open for 3rd party integrations right out of the box, without any additional effort.

As for tooling, we use eclipse with a few additional plugins (maven, spring IDE, aptana, subclipse), maven as a build tool, Cruise Control for continuous integration, and Selenium IDE plus qooxdoo's Simulator extension for scripted testing. The development server is tomcat, with a mysql database. Since the persistence relies on simple, portable stored procedures, it is both fast and efficient (there's no faster way to call the database than stored procedures), and easily portable (although not as easy as using hibernate, but unfortunately hibernate has become a monster, IMO, and wrting its HBM files is no easier and probably not generating a database as efficient as a hand-crafted database with stored procedures).

a-flj-