English 中文(简体)
Android & Web: What is the equivalent style for the web?
原标题:

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for the web? I mean, with a predefined list of widgets that can be defined using a markup language and then control them using code?

I have come across Google s Web Toolkit that does something like this but I d like to hear what other s think as well.

问题回答

I know this a fairly old thread, but if you haven t tried it by now, Wicket is exactly like this. I came from doing wicket development to Android and it has made it tons easier. Exact same concept. Define your UI with HTML and then any html objects you need any control logic on, you set a Wicket ID. Then in a wicket java file, you write your logic referencing the html wicket ID s that were set. It has tons of predefined widgets that handle so much behind the scenes. It s one of the best web frameworks I ve dealt with.

Try asp.net with Visual Studio. No xml needed! Add the MVC framework, and you re in heaven.

PHP Framework: http://www.pradosoft.com/

Google web toolkit works somewhat in the manner you re describing, especially the 2.0 version that s coming out, which will allow defining the layout in html/xml, rather than java swing style widget adding.

And as Benji said, Asp.net works exactly like this.

Personally, I much prefer an MVC approach over a code-behind approach.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签