开发者

Jump-starting web development

I wrote a prototype for my software in Python as a desktop client-server program, but I want to do the real version as a web service. (I have seen the light? much better deployment and reduced cost) Trouble is, I don't know web development.

I already did something webdev-ish: I have a page with a form on it, that when submitted Apache will run my Python script, which will do some server-side tasks and then send the result on a new page back to the user. Its a very simple tool (doesn't use any DB or framework), but I suppose that's the basic idea of web-based services... I think. To me that was a workaround, I did not realize it is webdev-ish.

So I have a basic idea of how it works, and about 8 years of programming behind me, but I need to learn:

  1. How to design web sites (XHTML and CSS?)
  2. Javascript and AJAX
  3. More advanced features of databases (Postgresql)

I'm thinking Python/Django is a safe bet.

Any suggestions on where to start? I'm not the type who has the patience to read a book; I would rather jump in and build something simple fir开发者_开发技巧st, then bigger and bigger stuff, but I can't seem to get my head around learning web design - I still format everything with tables.

Cheers and thanks


Check out Django. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

There will be a learning curve, but you might as well learn how to do it right the first time. Go through the documentation, and start building small Django applications. There are tutorials on the Django website.

And yes, you will have to learn HTML and CSS anyway.

Tables are not evil, by the way. You don't have to learn your first website with CSS, but you will need to learn correct CSS layout sooner rather than later. There are free CSS templates out there you can use, which makes the correct use of CSS much easier.


I only got slightly into Django, but I hear good things, so stick with it if you like the approach... inheritance & templating language

XHTML blocks just need to not overlap (markup container rule, good XML syntax with contained elements closing before new ones are begun). Honestly the simplest & most common approach to start web layout is PHP, so I suggest that as first alternative since it is so template-centric.

my favorite CMS is ZOPE, built and used with Python for scripting. Zope3 is more like Django, Zope2 I use more still (Python 2.4.x) has some internal syntaxes and methods to grapple with at first, but if you wish to try it I have a basic site editing framework.

the advantage is the object database hierarchy is just like site structure, inheritance of scripts, content objects (HTML chunks & contextual values), properties... so duplication is minimized, the whole site can be a simple template, reuse & extension maximized. navigation scripted, archive by month & listing contents scripted, footer once, sidebar inherited throughout site - override by cloning into subdirs and editing or specifying object/property for local instance closest to the URL path then seeking up to root.

users can have roles in sections, XML-RPC/HTTP/FTP all ZOPE methods including user-defined, so rich clients can workflow media effectively. batch process media uploads with default containers for each item and metadata (filename, type extension) so users get right to their details. ZOPE can host files or static, remote, whichever, so long as the app knows where to find them (one base property for the app or project root)

if you get into Django there is the ZODB standalone library part of ZOPE for persistent storage only, no ORB

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜