TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Help - Getting started with coding web apps

5 pointsby bjoernwabout 16 years ago
I am sure you get this often so I apologize. I want to get into coding my own web applications. I know html, css, and have taken some stabs at learning php. My problem is that all of the tutorials are so abstract and I don't see how I can apply some of the basic stuff. So my question is: What programming language should I be learning to write solid web apps and where could I find some resources for beginners that help me apply the basics.<p>This newbie appreciates the help.

4 comments

cschwarmabout 16 years ago
As a hobby programmer I had the same problem some years ago. IMHO, any programming language currently used to write web apps enables you to write "solid" web apps.<p>But I am wondering why you find all tutorials to be "abstract" although you already looked into some PHP tutorials. PHP has a very flat learning curve and there are tons of easy newbie tutorials out there. It's PHP's biggest advantage! One can hardly call PHP consistent or concise. But its documentation and general support is best. So why should you have problems?<p>After all, programming is very much all about abstraction, isn't it?<p>Let's say, there's a web site with 10 or 20 static pages. It's "abstraction" to replace their common header and footer by a simple PHP print statement, so you wouldn't have to edit each page for one change in the header/footer. It's abstraction to save the content of each page into a database and to add some sort of dynamic navigation. It's abstraction to design the database for "news entries" that will be displayed in a list or a detail view.<p>So I may be wrong -- and I apologize in advance if I am --, but maybe you simply lack some basics?<p>In this case, I'd advise you to start with Python. It's a consistent, concise, and well-supported language. A series of steps may include:<p>(1) Learning Python: <a href="http://www.ibiblio.org/obp/thinkCSpy/" rel="nofollow">http://www.ibiblio.org/obp/thinkCSpy/</a><p>(2) Learning DB normalization: <a href="http://www.databasejournal.com/sqletc/article.php/1428511/Database-Normalization.htm" rel="nofollow">http://www.databasejournal.com/sqletc/article.php/1428511/Da...</a><p>(3) Learning basic SQL: <a href="http://en.wikipedia.org/wiki/SQL#Language_elements" rel="nofollow">http://en.wikipedia.org/wiki/SQL#Language_elements</a><p>(4) Learning Regular Expressions: <a href="http://en.wikipedia.org/wiki/Regular_expression" rel="nofollow">http://en.wikipedia.org/wiki/Regular_expression</a><p>(5) Learning Django 1.0: <a href="http://docs.djangoproject.com/en/1.0//" rel="nofollow">http://docs.djangoproject.com/en/1.0//</a><p>After (1), you should be able to write simple command line apps to help you simplify computer usage. (2) is necessary for understanding Relational Databases and (3) for understanding SQL, later. (4) is a prerequisite for the final step, (5). Django is a web development framework comparable to Ruby On Rails.<p>From a newbie point of view, it has the following advantages: It comes with its own small web server, so you don't need to deal with Apache yet. It also comes with a template engine, so you learn to organize HTML into templates. It also comes with database abstraction so you need no real SQL in the beginning, just the basics of step (2) and (3). It also comes with an admin interface and several other build-in features so you don't need to deal with these. It has lots of add-ons called 'apps' you can study to gain a basic overview on typical problems when developing web pages.<p>Django uses an MTV (Model, Template, View) architecture, so you can write CRUD (<a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete" rel="nofollow">http://en.wikipedia.org/wiki/Create,_read,_update_and_delete</a>) functions easily -- the core stuff of nearly all dynamic web applications.<p>But there are also some disadvantages: Its URL system needs an understanding of regular expressions, thus you'd need (4). But it still may be frustrating. Its documentation is rather good, but unfortunately not written with web development newbies in mind. That especially holds true for "Tutorial: Writing your first Django application".<p>To get around the second problem, read the following chapters in the following order:<p>(1) <a href="http://docs.djangoproject.com/en/1.0//intro/install/#intro-install" rel="nofollow">http://docs.djangoproject.com/en/1.0//intro/install/#intro-i...</a> -- Installation<p>(2) <a href="http://docs.djangoproject.com/en/1.0//topics/http/urls/" rel="nofollow">http://docs.djangoproject.com/en/1.0//topics/http/urls/</a> -- This will enable you to link URLs to certain "views" and thereby to design your URL structure. You will need some understanding of Regular Expressions here.<p>(3) <a href="http://docs.djangoproject.com/en/1.0//topics/http/views/" rel="nofollow">http://docs.djangoproject.com/en/1.0//topics/http/views/</a> -- This will enable you to write "Views", a response for a URL call, in the beginning probably just a "Hello, World" response.<p>(4) <a href="http://docs.djangoproject.com/en/1.0//topics/templates/#topics-templates--" rel="nofollow">http://docs.djangoproject.com/en/1.0//topics/templates/#topi...</a> Templates will allow you to split your HTML into separate pieces and make them more independent. If you have done this, you can alter the responses from (3) to use the templates and return the content of variables.<p>(5) <a href="http://docs.djangoproject.com/en/1.0//topics/db/models/" rel="nofollow">http://docs.djangoproject.com/en/1.0//topics/db/models/</a> -- This allows you to model your data, for example some news/blog entries.<p>(6) <a href="http://docs.djangoproject.com/en/1.0//ref/contrib/admin/#ref-contrib-admin" rel="nofollow">http://docs.djangoproject.com/en/1.0//ref/contrib/admin/#ref...</a> -- This enables the Admin interface so you can enter some example data for your models without SQL.<p>(7) <a href="http://docs.djangoproject.com/en/1.0//topics/db/queries/" rel="nofollow">http://docs.djangoproject.com/en/1.0//topics/db/queries/</a> -- This teaches you make simple queries on the example data. At this point, you can alter your Views again, to fetch some data and display this in your template.<p>(8) <a href="http://docs.djangoproject.com/en/1.0//topics/forms/#topics-forms-index" rel="nofollow">http://docs.djangoproject.com/en/1.0//topics/forms/#topics-f...</a> -- This lets you enter and edit data without the admin interface. You may add some Views and Templates for this.<p>And there you are! That's the basics of web development: Fetch some data from somewhere, maybe modify it somehow, then provide views on the results by using a URL structure. Maybe, provide forms to enter and edit data if necessary.<p>The rest is basically just repetition thereof and some technical details (Protocols, etc.) Most of the time, Django will provide an easy means to solve these boring problems. If you got this far, you can dive into all the details: Apache, SQL with PostgreSQL, Email, Feeds, User management, Internationalization, Testing, different Content types, etc.<p>Of course, you may also switch the framework or language, then.<p>Again, I apologize if I misunderstood your question.
评论 #579077 未加载
ideamonkabout 16 years ago
"What programming language should I be learning ..." Well working over a problem is best way to learn and understand. Instead of aiming to learning a programming language or something more, try applying the knowledge you already have and come up with a small web-app that does something (anything! small or big). As you walk this path of learning by doing, you will learn a lot more than you might think you've learned after reading a book. Keep a tap on good tutorials and inspirational articles - try shmashingmagazine, nettuts, psdtuts, thinkvitamin... etc<p>After done with say, PHP also try getting a taste of MVC, try CodeIgnitor...<p>I notice no mention of MySQL or other databases mentioned by you.... do learn them too, after all you would be playing around with data :) presenting it in different ways.
SingAlongabout 16 years ago
PHP is a good start to take a stab at web dev. The fact that many web hosts support it also means that hosting is cheaper for you go out and try something.<p>Since you are starting out I would suggest you to write a couple of small webapps before you go for the one you are into. I do this for every new language I learn and it's helped me a lot. Just reading thru a tutorial totally different from doing it and getting first-hand experience, especially if you are going to work with Python and Ruby for webapps.<p>I had a odd but great experience when I first learnt PHP, that was around 4yrs ago. Every time I did something, I found there was a better way to do it and the PHP documentation on the website is great (and the comments for every page on the docs)<p>And also learn Object Oriented stuff in PHP. Learn to use classes and objects. This opens up a whoile new shelf of resources for you. Coz then you can start using classes that others have created for specific tasks. phpclasses.org has a pretty huge database of classes. Also as you go, just get started with using an MVC. Use CakePHP (I use it and its good) or CodeIgniter or Kohana (as many here suggest often).<p>I suggested PHP coz it also saves you the pain of learning how to deploy your app. For PHP it's pretty straight forward, just upload the files and it works. Good for starters.<p>P.S: Don't listen to me. Just do it your own way. Coz that's what you'll do anyway. It's never possible to follow suggestions/rules, like a sworn monk. And that's how you'll enjoy learning :P
评论 #578603 未加载
safetytrickabout 16 years ago
I think its more important to find a starter application or site that you care about. If you are interested you will find a way to make it work and learn the language along the way. I ended up learning a lot from my first site, scrapping the whole thing and rewriting twice. I think that's just how it works. Find an idea that you care about and make it work.