473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Help with choice of suitable Architecture

Hi,

This is my first post so go easy!

I have been asked (as part of an MSc project) to create a server based
planner for a research group at my uni. It will have a web interface to
interact with data stored in an XML document. Basic functionality is
required such as viewing, searching, editing, creating and deleting
entries for things such as paper submission deadlines, events, funding
application deadlines. I would also like to use AJAX principles in the
web interface.
Additionaly, it must email a BibTex file once a month to a
predetermined address.

I'm totally new to web programming. I have been looking into the best
way to proceed. CGI is of course an option but it seems slow, clunky
and outdated. Twisted provides a rich architecture but might be
overkill. Nevow seems to be very popular.
I suspect I could achieve what I want using PHP but I would really like
to get to grip with Python.

I'm not asking for a comparison of each architecture per se.... that
seems to be well covered in this group. I would like to know how you
all would set about creating this realtively simple application.

Cheers,
Rob Cowie
Coventry University, Britain

Jul 19 '05 #1
9 1379
"Rob Cowie" <co*******@gmail.com> writes:
I have been asked (as part of an MSc project) to create a server based
planner for a research group at my uni. It will have a web interface to
interact with data stored in an XML document.
Why not just a regular database?
Basic functionality is required such as viewing, searching, editing,
creating and deleting entries for things such as paper submission
deadlines, events, funding application deadlines. I would also like
to use AJAX principles in the web interface.
Yecch, just use standard HTML, don't depend on client scripting
without a concrete good reason. It makes stuff more confusing for
both human and automated users, and makes people weaken their browser
security by enabling scripting. That stuff went out of style with
pop-up ads.
Additionaly, it must email a BibTex file once a month to a
predetermined address.
That's no big deal.
I'm totally new to web programming. I have been looking into the best
way to proceed. CGI is of course an option but it seems slow, clunky
and outdated. Twisted provides a rich architecture but might be
overkill. Nevow seems to be very popular.
CGI is conceptually the simplest, but leaves you needing to do a bunch
of stuff yourself. A database back end helps a lot in dealing with
concurrent updates. There's a bunch of other Python web frameworks
too (Spyce, CherryPy, Zope, ...).

For a generic overview, you might look at the now-somewhat-outdated
book "Philip and Alex's Guide to Web Publishing",

http://philip.greenspun.com/panda/

I suspect I could achieve what I want using PHP but I would really like
to get to grip with Python.


If the goal is simply to get to the finish line, PHP might get you
there faster for something like this. If it's an academic project
where "the journey is the reward" there's lots of things you can try.
Jul 19 '05 #2
On Sat, 28 May 2005 20:24:15 +0200 (CEST), Tomasz Rola <rt****@ceti.pl>
declaimed the following in comp.lang.python:
also some mechanics under the hood - manipulating data etc. BTW, does it
have to be stored in xml file? The SQL database could be easier. You can
add import and export to/from xml file if this is really needed.
If it MUST be in a single XML file, some means of serializing
access may be required -- be pretty messy if two clients both submit
updates (spawning two CGI processes, each of which does a
read/modify/write of the file).

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 19 '05 #3
I agree with the sentiments that a single XML file is not the way to go
for storing data that may be accessed concurrently. However, my hands
are tied.

It seems that CGI is likely to be the most straightforward option. Is
the learning curve likely to be steeper for pure CGI or a web
application architecture such as Nevow?

Paul..... I agree that client-side scripting increases the level of
compexity, but did it really go out of fashion with pop-ups? It seems
to be just getting started. Google use it to great effect.... maps,
suggest etc. I wasn't thinking of using it to deal with any 'business
logic', just to add some dynamism to the interface - use
XMLhttprequests, a bit of DOM scripting etc.

Jul 19 '05 #4
"Rob Cowie" <co*******@gmail.com> writes:
Paul..... I agree that client-side scripting increases the level of
compexity, but did it really go out of fashion with pop-ups? It seems
to be just getting started. Google use it to great effect.... maps,
suggest etc. I wasn't thinking of using it to deal with any 'business
logic', just to add some dynamism to the interface - use
XMLhttprequests, a bit of DOM scripting etc.


It's clearly not gone. Just remember, that people do turn it off for
security reasons. Doing so also does a good job of killing popups and
the like. I normally run with JavaScript off, and the local city
government has installed IE with it disabled on all their desktops.

So make sure the functionality of the site doesn't require javascript
to be enabled. This may require duplicating functionality, but you can
save your design by hiding the non-javascript version of the
functionality in a <noscript> element.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 19 '05 #5
"Rob Cowie" <co*******@gmail.com> writes:
Paul..... I agree that client-side scripting increases the level of
compexity, but did it really go out of fashion with pop-ups? It seems
to be just getting started.
Pop-ups and scripting-related security holes are why the cool kids all
surf with Javascript turned off. Who cares about what Joe Sixpack is
doing? ;-)

Anyway, don't increase complexity without a good reason.
Google use it to great effect.... maps, suggest etc. I wasn't
thinking of using it to deal with any 'business logic',
There is some case to be made that the Google maps interface presents
concrete good reasons to use scripting, falling into the "concrete
good reason" exception. I dunno about "suggest". I do see that
Google Groups uses scripting in an unnecessary and obnoxious way, just
like most other uses of scripting. You're doing a text-only service
so you shouldn't even depend on graphics being available in the
browser (your system is IMO defective it doesn't work properly with
Lynx).
just to add some dynamism to the interface - use XMLhttprequests, a
bit of DOM scripting etc.


That's sort of vague. A concrete good reason means a specific set of
benefits you can provide to the user with scripting that you can't
provide without scripting.

See also: http://www.anybrowser.org
Jul 19 '05 #6
Rob Cowie wrote:
I agree with the sentiments that a single XML file is not the way to go
for storing data that may be accessed concurrently. However, my hands
are tied.


You might like to see the thread "write to the same file from multiple processes at the same time?"
for a preview of the issues this raises.
http://groups-beta.google.com/group/...fc42fefe114d38

Kent
Jul 19 '05 #7
In article <7x************@ruckus.brouhaha.com>,
Paul Rubin <http://ph****@NOSPAM.invalid> wrote:
Jul 19 '05 #8
Thanks for the comments.

I kind of get the impression that CGI is the way to go for this
application, and that I should forget about adding client-side
scripting based functionality for the sake of accessibility - which I
understand and kind of agree with.

I'll look into the problem of concurrent access to an XML file. I may
get back to the group about this!

Cheers

Jul 19 '05 #9
"Rob Cowie" <co*******@gmail.com> writes:
Thanks for the comments.

I kind of get the impression that CGI is the way to go for this
application, and that I should forget about adding client-side
scripting based functionality for the sake of accessibility - which I
understand and kind of agree with.
I don't see any intrinsic reason for client-side scripting, or
JavaScript in particular, messing up accessibility. One can fall back
to vanilla HTML+CSS for people who don't have JS turned on. I don't
say it's easy, though. I don't know what you intend the content of
your Masters to be, but this seems like an interesting and useful
thing to work on, and a fashionable topic to boot: write your app as
one piece of code that can run happily with JavaScript (and taking
advantage of AJAX) or without (without resort to if statements in your
application code, obviously ;-).

Personally, I'm anticipating the day I can change an import statement
in my Qt GUI applications and run them on the web (== JavaScript +
HTML + CSS + HTTP) <0.5 wink>.

In the mean time, I recommend Quixote (yes, you can run it on CGI).
Lots of people seem to like Twisted, too (nevow has some AJAX
support), though perhaps Twisted and CGI don't sensibly go together
(and I certainly understand the desire to avoid long-running server
processes).

If you're interested in new stuff, certainly take a look at Kamaelia
(after you've oriented yourself a bit by writing a tiny web app or
two!).

I'll look into the problem of concurrent access to an XML file. I may
get back to the group about this!


From my own unpleasant experience, CGI + locking = pain. At least if
you don't have full control of the server (even then, do yourself a
favour, use a DBMS, and let somebody else worry about some of the hard
parts of locking, transactions &c.). Why not keep the XML in a
database blob, if somebody insists on an XML-based implementation?
Or, more sane, store your data in the DB, then just write out XML,
which presumably solves the *real* problem for which XML is the
solution (interoperability)?

have-the-appropriate-amount-of-fun-ly y'rs,
John
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

198
by: Sridhar R | last post by:
>From technical point of view, I could not understand the the reasoning behind using Java in major companies. Sure that Python, is used in some, but still Java is considered as a sure-job...
5
by: John | last post by:
Hi, I have the following code: <FORM> <font size="3">Brands </font><br /> <SELECT SIZE="1" NAME="categorylist" STYLE="font-size: 8pt"> <OPTION VALUE=http://my.domain,.com/cetegory1.html...
9
by: Craig | last post by:
Hello friends at comp.lang.c, I'm trying to combine 2 strings with a newline character at the end to write to a file. When I view the file, the messages run together and some of the str string...
10
by: stylecomputers | last post by:
Hey guys, I am absolutely new to Linux programming, with no w######s programming experience except a small amount of C++ console apps. Reasonably new to Linux, BSD etc, got good sound networking...
3
by: dick | last post by:
Is a load-store architecture machine more suitable to run C++ code?
10
by: NUPUL | last post by:
Hi, I have a few questions to ask with the use of C++ per se: 1. For what type of applications is C++ actually used/preferred/ chosen? 2. ANSI C++ doesn't have any support for GUI...
15
by: colemanj4 | last post by:
Here is what I have so far, it loops while the PW is incorrect, or until cancel is selected. I want it to lock the tables for adds, deletes, and edits when cancel is selected, and if the PW is...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.