You are not logged in.

#1 2008-08-28 18:39:51

void.pointer
Member
From: Dallas, TX
Registered: 2008-07-30
Posts: 239

[SOLVED] Web Applications: What are they?

Hi,

Right now I'm a professional C++ programmer, and I really have no experience whatsoever in regards to web development. I do know Python, and since I have no desire to learn Java nor any of its variations, I was hoping I could develop extremely nice websites with Python alone (Of course, HTML, XML, and CSS are implied). So far from my research, it is not possible to do any sort of client-side programming if you do not use Javascript. This is unfortunate, but I am still not willing to learn Javascript.

I've setup mod_python on my apache server, but I'm not sure if one would call mod_python something capable of creating "Web Applications". In an attempt to figure out exactly what web applications are, I read the article on Wikipedia, and found out about Pylons. Pylons looks incredibly complicated (Only having briefly reviewed it), and I'm still not sure what it provides over mod_python, or if they work in collaboration.

Could someone explain how feasible it is to ignore Java entirely when it comes to developing "pretty" and "functional" websites? Does this mean I will have to stick to server-side programming exclusively? Could someone explain what Web Applications are and if Pylons is a wise choice for one?

Thanks for your time.

::EDIT::
Also, I'd be curious to see what kinds of things I'm sacrificing by not doing client-side programming. Will I still be able to use things like list/combo boxes (Drop-down menus)? Technically these don't require the page to refresh, and when I think of things that occur without a page refresh I usually think of javascript. I'm not sure if this is appropriate.

Last edited by void.pointer (2008-08-29 02:13:28)

Offline

#2 2008-08-28 19:19:08

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: [SOLVED] Web Applications: What are they?

Hi,

void.pointer wrote:

I've setup mod_python on my apache server, but I'm not sure if one would call mod_python something capable of creating "Web Applications". In an attempt to figure out exactly what web applications are, I read the article on Wikipedia, and found out about Pylons. Pylons looks incredibly complicated (Only having briefly reviewed it), and I'm still not sure what it provides over mod_python, or if they work in collaboration.

the mod_python apache module just embeds the python intepreter, to make it possible for the webserver to execute python code, not more not less. Pylons is a so called framework to create web applications. A framework usually consists of a collection of librarys which help to create web applications without the need to code everything from the ground. For example functions to easily create HTML output, interact with databases, hashing algorithms for authentication handling, upload management, cashing backends, templating engines etc. etc.. The downside of most of these frameworks however is, like you noticed already, the often steep learning curve to get used to them (among the fact that some of them don't perform well).

void.pointer wrote:

Could someone explain how feasible it is to ignore Java entirely when it comes to developing "pretty" and "functional" websites? Does this mean I will have to stick to server-side programming exclusively?

If you want to completely ban javascript, than that pretty much means you have to stick to server-side programming. However, there exist quite a bunch of javascript libraries which are very easy usable. And most of the web application frameworks support them anyway. Pylons for example has support for Prototype, Dojo, JQuery (which I'd recommend because it's relatively lightweight and easy to use).

void.pointer wrote:

Also, I'd be curious to see what kinds of things I'm sacrificing by not doing client-side programming.

Most importantly a better user expierence. Take forms as an example. By using javascript you can do all the input validation and point a user to missing fields or wrong input, before the form is submitted, and safe the user from getting the form presented again (that of course doesn't imply that the web application itself doesn't have to do any input validation anymore wink). However, there are different opinions on that matter. A well written web application should also be 100% functional if the user has disabled javascript in his browser for security reasons.

HTH

PS: I don't know whether Pylons is a good choice or not because I've never used it. Maybe someone with some experiences with Pylons can give an answer to this.

Last edited by chimeric (2008-08-28 19:21:31)

Offline

#3 2008-08-28 19:31:19

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: [SOLVED] Web Applications: What are they?

In modern lingo, a web application is basically a website that interacts like a desktop application. You pretty much need javascript for this to happen because javascript (with the AJAX call) allows you to request data from the server without a page refresh. If you don't use javascript, you're pretty much stuck with reloading the entire page every time you send data to the server. This is very 1990s, but it works reliably. The thing that it takes a while to wrap your head around as a C/C++ programmer is that half of the work you're doing happens on the server and half of it happens in the web browser. So most of your time is spent sending info back and forth between the two. Quite frankly, this is really stupid and inefficient. Back in the 60s and 70s they tried to make 'dumb terminals' that did nothing but send data to the main frames of the day. We cycled into the networked PC world, but now we're going back toward relatively dumb terminals that send everything to a "cloud" or "cluster" provided by companies like google or Amazon. Someday it will cycle back again. and again and again...

I digress, sorry about that. Back to the client side:

Javascript and Java are totally different languages. I personally dislike Java but I find javascript tolerable. Its got too damn many semicolons and braces, but other than that its quite similar to python in many ways. There are some tools for doing python inside the web browser on the client side, but you can't do any "real" (read: somebody besides you will use them) webapps using them since you can't expect normal people to have the python library installed in their browser.

You can submit forms without using javascript. Form elements like dropdowns, checkboxes, text input are all part of (X)HTML and do not require javascript to operate. But I can guarantee you'll wish you could do something on your page and discover javascript is the only way to do it.

You will do fine on the server side. There are many frameworks for python. I suggest playing with web.py which is the simplest (Arch definition of simple, not simple to use). I personally use django and I really like it, most of what it does is very similar to the python philosophy; it just makes sense (if python makes sense). Turbogears is another popular option; one of the Arch devs uses it for his business product.

Dusty

Offline

#4 2008-08-28 19:38:43

kett
Member
Registered: 2008-04-21
Posts: 104

Re: [SOLVED] Web Applications: What are they?

Not knowing much a ton about python, I won't be much help with Python specfic questions. I do know that Django and TurboGears are two alternatives to Pylons.

However, having worked quite a bit with Ruby and Ruby on Rails (the ruby equivalent to Pylons, Django...), I recommend just picking a framework, and spending some time getting to know it.  Since they provide lots of functionality that allows you to avoid HTML altogether if you choose.

As far as javascript is concerned, I agree with chimeric that you really should learn javascript in some form.  Something like JQuery or Prototype, mentioned above, simplifies it a great deal, as it cleans up the language quite a bit, making it easier to use.  But, these days, Javascript really is pretty standard on all websites, as it increases user functionality quite a bit when used correctly. 

Also, javascript and java really aren't much alike.  So don't be put off of javascript just because you don't want to learn java.  The names are the same, I believe, because they both come from the work of Sun Microsystems.

Offline

#5 2008-08-28 20:15:50

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: [SOLVED] Web Applications: What are they?

kett wrote:

Also, javascript and java really aren't much alike.  So don't be put off of javascript just because you don't want to learn java.  The names are the same, I believe, because they both come from the work of Sun Microsystems.

Not quite. The original javascript was developed by Netscape. They called it javascript to borrow some of the hype from the then new, cool, exciting, and overmarketed Java platform. I think there was some kind of deal between Netscape and Sun though, Netscape got to use the name if they included the (real) Java plugin with Navigator or something like that.

</history_lesson>

Dusty

Offline

#6 2008-08-28 22:44:42

freakcode
Member
From: São Paulo - Brazil
Registered: 2007-11-03
Posts: 410
Website

Re: [SOLVED] Web Applications: What are they?

void.pointer wrote:

Right now I'm a professional C++ programmer, and I really have no experience whatsoever in regards to web development. I do know Python, and since I have no desire to learn Java nor any of its variations, I was hoping I could develop extremely nice websites with Python alone (Of course, HTML, XML, and CSS are implied).

Yes, Python does have great libs and frameworks so you can start doing web applications without getting too deep into plumbing, low level stuff. I recommended taking a look at Django, but there's more: http://wiki.python.org/moin/WebFrameworks

I've setup mod_python on my apache server, but I'm not sure if one would call mod_python something capable of creating "Web Applications".

This way you're just scripting with embeded Python, not so fancy. That's why using a framework is recommended, so you can structure your application following a proven base and design pattern.

Could someone explain how feasible it is to ignore Java entirely when it comes to developing "pretty" and "functional" websites?

"Pretty" and "functional" don't really have any connection to the backend language you're using.

Also, I'd be curious to see what kinds of things I'm sacrificing by not doing client-side programming. Will I still be able to use things like list/combo boxes (Drop-down menus)? Technically these don't require the page to refresh, and when I think of things that occur without a page refresh I usually think of javascript. I'm not sure if this is appropriate.

Client-side is done in javascript almost exclusively, as it's the more portable way of doing this - all recent browsers support it. But there is a caveat: client-side scripting should be a "plus", a web application shouldn't rely deep on the peer capabilities to do what it needs to do, or you will start facing browser incompatiblity issues, security issues, etc. The better way is trying to keep client-side scripting to a minimium necessary, the application should be fully capable using only the GET/POST capabilities of the peer (the client browser, in this case, but could also be another application).

Offline

#7 2008-08-28 23:19:27

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: [SOLVED] Web Applications: What are they?

Why are you opposed to learning anything with Java in its name? JavaScript/ECMAScript is not derived from Java. Also, just out of curiosity, what do you have against Java? Sure, it's not as powerful as C++ and it's not as productive or concise as Python, but why are you vehemently opposed to all things Java? Sun's implementation is now under the GPL, and there was gcj before that, so I doubt it's an ideological reason. Just curious.

Offline

#8 2008-08-29 00:00:41

void.pointer
Member
From: Dallas, TX
Registered: 2008-07-30
Posts: 239

Re: [SOLVED] Web Applications: What are they?

dsr wrote:

Why are you opposed to learning anything with Java in its name? JavaScript/ECMAScript is not derived from Java. Also, just out of curiosity, what do you have against Java? Sure, it's not as powerful as C++ and it's not as productive or concise as Python, but why are you vehemently opposed to all things Java? Sun's implementation is now under the GPL, and there was gcj before that, so I doubt it's an ideological reason. Just curious.

I simply just have no desire to learn it. In my industry, Java would not be very useful (I'm a video game developer). Since I do not know it, I obviously cannot judge it fairly. I've seen applications written in java and they're all very disappointing in performance, but still I do not judge java. For all I know, the slow performance could be a product of bad programming practice, as the same could happen just as well in C++.

It's nothing personal, I just don't want to bother with a language (Java) I know I won't use often enough to remember it very well. I did not know Javascript had really nothing to do with Java, I always thought of it as a stripped down version of Java for some reason. In any case, if I'm going to be developing websites I suppose it wouldn't hurt to learn Javascript, assuming it is fairly straight forward (Like Python). I can't expect to go into a new area of development with such a close-minded attitude smile

It's not that I was totally opposed to learning a new language, even though it may have sounded that way. I just had an extremely strong preference to not have to learn a new language if at all possible. I was even willing to give up some interesting features to accomplish that. However, I want user experience to be a plus so doing client side programming would be worth the time in that respect, I guess.

I've installed the django package and I'm going to start researching it. On that same note, I'll check out some javascript tutorials and get used to the language itself. Hopefully all of this will be pretty easy coming from C++ and won't take too long.

I appreciate everyone taking the time to respond and offer their wisdom on this subject. This is truly one of the best communities I've ever seen smile

Offline

#9 2008-08-29 01:04:38

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: [SOLVED] Web Applications: What are they?

void.pointer wrote:

I simply just have no desire to learn it. In my industry, Java would not be very useful (I'm a video game developer).

That's fair.

void.pointer wrote:

Since I do not know it, I obviously cannot judge it fairly. I've seen applications written in java and they're all very disappointing in performance, but still I do not judge java. For all I know, the slow performance could be a product of bad programming practice, as the same could happen just as well in C++.

There actually is one Java app that doesn't suffer from the performance problems that are known to plague Java (or at least Sun's JVM): Art of Illusion. big_smile

void.pointer wrote:

I've installed the django package and I'm going to start researching it.

I've never used Django, but I've heard it's as good as Ruby on Rails. Python ftw!

void.pointer wrote:

This is truly one of the best communities I've ever seen smile

Amen to that.

Offline

#10 2008-08-29 02:26:45

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: [SOLVED] Web Applications: What are they?

void.pointer wrote:

I've installed the django package and I'm going to start researching it.

Feel free to ask questions here, I'll answer if I notice them and have time, and dozens of others will to.

The official django documentation absolutely rocks, but don't overlook this either:

http://www.djangobook.com/

Its more of a step by step thing than the official docs and is therefore good when you're starting out. The official docs are great for reference. Also once you get started reread the official docs regularly because new stuff keeps getting added.

Use django svn or the new 1.0 beta instead of 0.96; a LOT has changed since then and its rock stable anyway. We use an svn django in a production environment.

On that same note, I'll check out some javascript tutorials and get used to the language itself. Hopefully all of this will be pretty easy coming from C++ and won't take too long.

Javascript is like python with C++ syntax with a few cool functional language features thrown in. If you know both those it shouldn't be hard to learn the syntax. I suggest studying JQuery too because it really minimizes the amount of javascript you need to write.

Dusty

Offline

Board footer

Powered by FluxBB