DAL is not going to help any client side storage, it's for server storage. DAL isn't going to help with any storage client-side. Only your views would help here. Python won't run client side, not unless you have Pyjamas, but then you don't have an HTML5 WebApp, you have a Pyjamas webapp. That may be what you are looking for. The way I see it, I would not want Web2Py turning into another Pyjamas. Pyjamas has it's place, Web2Py has it's own place, and remember one of the keys to Web2Py is DRY.
On Friday, March 23, 2012 3:34:27 PM UTC-7, monotasker wrote: > > Right. For something as simple as an RSS reader I see your point. But for > more complex applications (I'm working on a web-based educational game for > language instruction) I think the gluon libraries offer more than this. The > DAL greatly simplifies the process of working with a db, and to the extent > that indexed client-side storage becomes the norm the DAL could certainly > help with that. On the other hand, web2py allows us to write complex > business logic in python rather than being forced to use js. I know that > some people write large applications with jquery, but for larger apps I > would much prefer writing in python. So web2py provides an MVC framework > for organizing the application (like, say, backbone.js would) as well as > providing all of the html helper objects. > > I realize that, as it stands, web2py requires a server to run and is based > on a traditional server-client model. My question is, could we take > advantage of the benefits of web2py in a local environment when other web > technologies are moving rapidly into local environments. If I code an html5 > app for win8 or for Mozilla's app store I would like the business logic to > be in python if that turns out to be a possibility. So could web2py provide > a framework for that, and if so how much work would it take to > implement/adapt. After all, web2py already includes the ability to generate > desktop executables with a freestanding local server. > > Ian > > > On Friday, March 23, 2012 6:14:34 PM UTC-4, Derek wrote: >> >> It's a server-client framework only. Your question does not make sense >> because html5+js+local storage = client. This is a server application. If >> you want to integrate localstorage, you're developing a client app, and >> thus there is no need for a server framework such as web2py. You could do >> all of that in your layout as easily as you could do anything else. >> >> Now, let's take an example app that is normally server-side and design it >> as an html5 client app, as an example, let's choose an RSS reader, for >> example. >> Your current (non-html5) app parses the rss files on the server, converts >> it to html and displays it on the browser. The only things you have stored >> in the database is the login, and urls for the rss files that the user >> would like to access. >> >> Your html5 app (+web2py) would work like this: >> login to the webapp (server) the first time. this will present your >> (client side) app - which will connect to the server, retrieve the json for >> the rss feeds, and saves the json into local storage, then displays what's >> in local storage based on javascript templates. >> >> The only advantage you'd get with an app like this is you can use it >> while you are disconnected from the network. >> >> But what would be better is to rewrite it so it will retrieve the rss >> feeds directly. Then you don't need the web2py piece at all. >> >> And that's my point. >> On Friday, March 23, 2012 2:53:15 PM UTC-7, monotasker wrote: >>> >>> I've been struck by the huge push lately for 'html5 apps' as a (partly) >>> cross-platform approach to mobile and desktop development. Now win8 is >>> integrating html5+js heafily into the desktop and the Mozilla app project >>> is pushing in a similar direction. In many ways I think it makes sense (I >>> find css, for all its shortcomings, a lot nicer to deal with than qt or >>> gtk). But where does it leave a framework like web2py? It seems to me that >>> part of the html5 push comes from developers' reluctance to learn a >>> server-side language well (even php). If we have jquery and indexed local >>> storage in the browser, then people can do a lot with simple tools. I think >>> this is a mirage in many ways. At the same time, I would like to think that >>> I could benefit from the strengths of web2py (and python in general) and >>> still, say, develop an app for Mozilla's upcoming app store. Has anyone >>> been thinking about this? Is there room in things like the win8 api or the >>> Mozilla app api to use web2py? If not, how difficult would it be to create >>> bindings and an api to be included in gluon? Could the DAL be extended to >>> work with browser-based local storage? Or should we see web2py as a >>> traditional server-client framework only? >>> >>> Ian >>> >>

