I'v just started learning different languages in web development and I believe the best way to improve is to think of an idea and develop it. (Feel free to correct me if i'm wrong).
My question is what aspect do I develop first. If I am looking to build a simple script which is styled and comprises of HTML, PHP and CSS, which part of the website do I design first?
I was thinking HTML > PHP > CSS however once I complete the css I would have to edit all the tags to include the css classes/id's. Is that the way it's done?
PS - Also I started off web development by learning the basics as well as a few intermediate aspects of all the three above mentioned languages and now Im looking to design/clone scripts I've come across to get better at them. Is this approach correct?
Thanks.
The order doesn't really matter.
Deal with the data and the UI separately (following the MVC pattern will help you do this), and modify each of them as needed.
You'll probably find that the optimal solution is to work on a feature at a time rather then doing the backend of all features and then the frontend of all features (or vice versa).
Within each feature, start on whichever end you have the strongest vision of and let it inform your development of the other.
HTML->CSS->PHP. Start by focusing on writing a valid, well-coded HTML page and learn to style it with CSS. After that, you can start to work with script.
Of course this is just my personal approach. Have the skeleton first and then you'll know where to put what
Learning to develop for the web is not a straight path; it’s really more like a cycle.
You will learn things (e.g. HTML and CSS), maybe to the point where you’ll be fairly confident that you master those technologies, then you will learn new things (maybe PHP), then you’ll look back at what you’ve done, and you’ll start realizing that you still don’t know much, because things evolve, and your perspective on those matters evolve as well, as you discover new techniques.
There is no absolute truth. My advice is to give yourself a goal, and try reaching it. Don’t worry about making mistakes. Don’t worry about what language or technology you pick. Just start small, because there is a lot to learn. Focus on understanding how the web works, how technologies interact. Learn about best practices, and always ask yourself how to make things better.
HTML and CSS of course.
PHP is just supporting feature.
You can have a perfect site without PHP or any other server-side programming language at all, but you cannot have a site without HTML and CSS as it's part.
Related
I first learned web programming with php a while back. It has some features that I find very helpful, but the overall language is not something I enjoy, just as a matter of personal preference. I am wondering what alternatives I could use to provide similar functionality using a different underlying programming language (Python? Ruby?).
What I am looking for:
general purpose programming capability
in-line server-side code embedded in HTML (i.e. I want to be able to make my documents pure HTML if desired, rather than demanding special syntax even where I don't want dynamic content)
access to request parameters
ability to send headers, set cookies, etc
Preferably:
does not require a separate server process
easy to connect with Apache
Does anyone have any suggestions?
One thing I tried to do was embedded Ruby (erb) through CGI. This looked like a good fit on paper. Unfortunately, I was not able to get it to work, because I was following a few different guides and the result of combining them did not work out. At any rate, it seems this would not allow me to set arbitrary headers (and more importantly, use sessions and cookies).
Note: I'm not looking for a full web framework at the moment. Just relatively small amounts of dynamic content among otherwise HTML pages.
Thanks!
You've hit on the big reason why PHP is so popular - it has all of those pieces in a server-embeddable package. There aren't really many solutions with its ease of deployment; PHP is written specifically for what you want, which is both its strength and weakness. It's why it's such a weak general-purpose language, and why everyone and their dog knows it. It's everywhere, and the barrier to entry is near zero.
PHP is a language plus templating plus a web framework all baked into one package. To get an equivalent, you're going to need a web framework, even if it's a small one. Something like Sinatra is a super lightweight way to do similar in Ruby, though it requires a separate server process.
You could look at something like Perl with cgi.pm, but it may be a step in the wrong direction if you're wanting something cleaner than PHP.
I don't know Python packages well enough to offer suggestions there, but Twisted makes it easy to bind a Python program to a web interface. That does end up running in its own server process, though.
You'll need to do a little more work than your standard PHP deploy if you want to use something besides PHP, but that's often a choice that people consider to be a reasonable tradeoff for gains in productivity.
Python Flask is a good web framework: it fits your requirements, easy to learn, and scales gracefully. Go through the tutorial to see!
I have three suggestions.
The first is Ruby on Rails - It's pretty fun once you get into it.. I would recommend going through Rails for Zombies to get a general idea of whether you like it or not.
http://railsforzombies.org/
It's really easy to get something up and running on Heroku for free, so you don't have to spend any money to get something up on the web..
My second suggestion is one I'm just trying out called Node.js. I'd recommend watching this video to get an idea of what it's about:
http://www.youtube.com/watch?v=jo_B4LTHi3I
If you're into Javascript, I think you'll get it right away. You can also build an open source Node.js project on www.cloud9ide.com which is pretty nifty too.
A third one, if you're into learning Java, is "Play". A cool video on this is:
http://vimeo.com/7087610
I haven't used this much, but it's on my "to do" list of things to check out. Overall, I suggest just dipping your toes in the water for a bunch of different frameworks and get an idea of how they work and then you'll naturally pursue whatever makes the most sense to you. Good luck!
I'd say given your requirement
Just relatively small amounts of dynamic content among otherwise HTML pages.
then, PHP is going to be hard to beat for getting going quickly and a minimum of learning overhead. It avoids all the CGI issues that you would otherwise have to deal with, and is in fact its own templating language. That's why so many get started with it. Once you get past the point of your goal of mixing a little programming logic into HTML pages, and developing more flexible, maintainable and testable applications, then frameworks such as Rails, Django and others will be worth your time to learn.
Using Scheme as a web development language meets your criteria, with a caveat: instead of inline code embedded in HTML, you have inline code embedded in the Lisp-ish representation of HTML called s-expressions. (There is a one-to-one correspondence between HTML and is s-exp equivalent; they can be interconverted with one function call.) So the static parts of your page and the code share the same syntax - something I really like about Scheme.
> (sxml->xml `(div (p "It's been: " (i ,(current-time)) " seconds")))
<div>
<p>
It's been: <i>1339772791</i> seconds
</p>
</div>
i have long wanted to be a web designer, self taught. My aim for this year is to design a wordpress theme from scratch. i dunno where to start from.
learn photoshop, html, js, php, mysql in which order? where to get the learning resources etc.
what do i need to learn?
any advice will be hugely appreciated...
Are you aiming for designer or developer or both? A designer doesn't neccesairily need to be able to make a fancy AJAX page that does all sorts of mysql things. Mysql isn't needed at all for a designer.
Now if you wan't not only to design the template, but give a complete sollution to you customers your need to do a lot more.
The order I would do it would be:
photoshop / drawing / 'designing' ->
make the actual thing you want to
sell (the image, the 'vision' etc)
Some usability etc: Show your clients why your design is better,
why it's a good page and why your site 'works'
HTML: you can make a mock-up for your site so they can actually click
trough it. You can also sell this as a base for their programmers.
javascript, AJAX etc: You can make your mock-up better like this!
Now you want to sell complete templates (not just the design), you'll have to start learning the ins-and-outs of wordpress templates. that's kinda like a language an sich.
Get some basic PHP skills if you want, cause it can get you out of trouble, but it's not a big amount.
Mysql is only needed if you want to start adding functionality etc, but now you're really talking about a second job :)
In building websites there are different disciplines. In a nutshell:
Designer. Draws the website, how it should look. Defines the style of the website. Uses mainly PhotoShop.
Interaction Designer. Defines where each feature goes and how it should work.
Client side developer. Writes client side code. HTML/CSS templates, maybe a bit of JavaScript, although there is a big difference between HTML and JavaScript and the skills you need. Maybe you should even consider HTML/CSS and JavaScript to different disciplines.
Server side developer. Writes server side code (PHP/ASP/...). Will probably need some SQL knowledge as well.
Database administrator. Keeps the database running. Actually not part of the web-building disciplines list.
So, you need to think whether you want to be all these persons, or just one or a few of them. I personally so mainly PHP development and a little JavaScript. In work, I hardly do any HTML/CSS, because this is done by another guy. If you got a fellow that wants to build websites too, you maybe could check where each others skills lie. If you're a programmer, you can focus on serverside and JavaScript, where he can build the lot in PhotoShop, think about the interactions, and build HTML/CSS. You will only need a little of eachothers skills for sparring, and you could build great things together because each of you has their speciality.
If you need to do it on your own, and you haven't got any of these skills yet, I would just start somewhere and at least try everything. Keep your learning projects simple, and don't start mixing 5 of the names disciplines. If you want to start using HTML techniques, don't mind tha fancy looks yet. Draw a few lines in paint and just pretend you got all these gradients and spiffy looks. With a bit of make belief, if you try one of these skills you don't need any of the other ones.
Ok, it might be a banal question but i'm a little bit confused.
I'm going to develop a project by my own. This means i'll build the HTML template, the PHP scripts, MYSQL query, AJAX calls and CSS styles.
This means no other people will touch any part of the code.
I know templates are good ways to make the entire application easy to be modified. But is that so necessary to do it? Since i'm the only one who got to know what that files and what that page do?
Using common patterns in the development of software products is not only about making it more readable/maintainable but also about making it extensible. The longer your software will be in use, the more features will be requested/desired. Extending one big mess of a software will not work out in this case.
Try a php framework (e.g. Zend Framework / Symfony(1/2)), there are lots of tutorials which allow you an easy start with or without templating engine (I use twig atm, which does a great job!).
If i were you, i wouldn't use templates (do you mean PHP frameworks?) but thats just me.
You don't have to use a template engine - PHP itself can do that just fine.
In general, it's a good idea to "separate concerns" (eg. code which outputs HTML is separate from code which loads data from the database) - it improves the readability and organization of code, making it easier to maintain and faster to develop further.
You should have a look at a framework, like symfony. Most frameworks make use of MVC and hence provide a good separation of your code.
But is that so necessary to do it? Since i'm the only one who got to know what that files and what that page do?
Yes, if you want to keep it maintainable in the long run. If you are not constantly working on the code, you will forget how some things work eventually and then you are happy if you have a proper separation and organization.
Should one need to learn php(or jsp) to create dynamic web-sites or just to use CMS ?.I am new to web-development...
If you just use the CMS without understanding how it works then you are limited by what the CMS will do out of the box or with plugins. You will have little scope for customisation, and not be able to fix things if anything breaks.
It really depends what you want to achieve. If a CMS does everything you need it to do, then you can probably get away with just using it out of the box.
(And now I will resist the urge to start a language war and just say that there are other languages beyond PHP and Java).
No, you can use cms without knowledge about php, css or even html.
Depends on what you want to do in what scope. If you're looking to set up a web site for your band (for example), there's no need to learn PHP. There are plenty of CMSes that can be set up without deep PHP knowledge.
If you want to start a web development career, however, learning a server-side language is pretty mandatory.
CMS Made Simple does not require much technical knowledge. Some is benefecient. But in the old days I used to work with complete lack of php/js.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have learned extremely basic PHP (I think so) using Lynda Tutorial. After that, I feel, I got some grip on that language. My ambition is to become a web developer! After some googling, I planned to learn some more advanced and practical php by using websites like PHPSCripts, Webapps etc..
But, now I'm in a confusion! After my studies, when I seek for a web developer position & got selected, how will I work, by just knowing some language basics?
Can you guys help me to become a good web developer, what will I have to learn & how to learn?
Also, can I get the steps to do a practical PHP project.
As a web developer it is important to have client and server side skills. But there are few web developers which are excellent at both... But knowing the basics and where to look for info is definitely a good starting point.
I would recommend to work through the following list(s) in the order presented. If you feel comfortable with a topic, move one. Even though that in reality you will often have to go back and forth during the learning process...
Client Side
HTML / XHTML
CSS
a JavaScript Library (e.g. jQuery, prototype/scriptaculos, etc.)
Server Side - Infrastructure
familiarize yourself with shell scripting if working on Linux (e.g. bash, etc.)
Webserver (e.g. Apache)
PHP Server
Databases (e.g. MySQL, PosgreSQL, etc.)
Server Side - Programming
PHP
SQL
Advanced Topics
After getting familiar with the basics...
AJAX (this is placed here because it is a client/server topic, not because it is advanced...)
Object Oriented Programming (OOP)
Security issues
Source Control Management (SCM) -> (e.g. git, etc.)
Model View Controller (MVC) software architecture
PHP Frameworks (Zend Framework, Symphony, CakePHP, Agavi)
Unit Testing (e.g. PHPUnit)
Object Relational Mapper (ORM) for PHP (doctrine, Propel)
Usually this keeps you busy for a while. At least it kept and still keeps me busy... ;)
Here are few suggestions:
Read these advanced/practical php articles on phpro.org
Learn the basics of OOP
Familiarize yourself with php frameworks and CMS
Familiarize yourself with HTML/CSS/Javascript
Try to make clones of other websites
Try to volunteer in open source projects, you may get started at:
openhatch
sourceforge
Im my opinion, A good webdeveloper MUST know:
HTML
CSS
JavaScript
After this, it's important to know:
Jquery
XHTML
Crossbrowsing (diferences of IE X Firefox x Chrome, etc)
Rationale:
HTML: it's the base of web.
CSS: in 2010, it's the base of web.
JavaScript: only the basic, to understand jquery after.
Jquery: you can solve a lot of problems quickly and it's large used.
XHTML: because your page may broke in modern browsers, if has a <br>, not a <br/>
Crossbrowsing: there is more than one browser in the world.
Just keep on practising. You will likely need solid HTML / CSS skills as well as PHP since the two go hand-in-hand - it's also useful to learn MySQL. Spend lots of time going through the tutorials on the excellent tizag.com as well as Lynda.
Once you're comfortable with all that and you're ready to move onto something more advanced, it's worth looking into Wordpress customisations and plugin development - that has the advantage of being pretty easy to use, with an awesome support community, and a whole bunch of mature code that you can look through yourself to get more familiar with how the language is used in the real world.
After that, try a framework like CodeIgniter or CakePHP - these are awesome for your productivity but do make sure you're comfortable with the basics first as the learning curve can be pretty steep and you want to reduce frustration as much as you can. :-) Learning design patterns will also be helpful at this stage.
One thing that will always be important to you, your users, your applications, and your potential employers is code security. I can't stress this enough. As soon as you put an application into real-world use, you have a moral and professional obligation to make that application secure. http://www.addedbytes.com/writing-secure-php/ <- read, digest, read other guides. Security is the single most important thing that a PHP developer can learn.
Above all, have fun! The best developers tend to be the ones that get genuine enjoyment out of what they're doing. You might find yourself eventually leaning in a different direction and using completely different technologies, so always keep your eyes open and be prepared to learn new things even if they don't necessarily 'fit' your current skillset. Also the more general knowledge you have about programming patterns, the better you will become in individual languages. Remember that it's an organic process so you will need to let it develop naturally - but help it along by exposing yourself to as much as possible (foreign language teachers call this 'immersion' :-) )
Regarding PHP
Make a small project using PHP, so you know that you know.
Learn a (MVC) framework like CakePHP or Agavi.
Read this SO answer.
Regarding Web Development in General
Know about CSS, XML, XHTML, XSLT, W3C validation, HTML5, JavaScript, AJAX (and most other acronyms you come across).
You will find there are various libraries which make your life easy, use them. And there will be one browser that will make your life difficult, but you will have do deal with it.
A solid web developer needs an understanding of HTML, CSS, JavaScript, and the server-side scripting language of her choice. But still more important is a solid foundation in programming. You don't have to be an expert computer scientist, but you need to understand how to structure a program and how to solve problems in a sensible way.
Most professional web development involves database access of some sort. Teach yourself SQL, and use a real SQL -- not Access -- for the effort. You can run MySQL or Postgres on a laptop these days, and it's free.
Learn to design databases well. Learn about normal forms, and indexes, and so forth. The time you spend on that will pay off in spades.
Take a while to study up on security. Look at the security bugs that have afflicted high-profile projects and sites. (Hint: they're pretty much mostly about trusting untrustworthy data, or else relying on old out-of-date infrastructure, but the consequences include site defacement and the compromise of valuable information.)
And then, take on a charity project somewhere. You won't get turned down, and you'll cut your teeth, so to speak. Just make sure you're not storing social security numbers or something crazy like that, because charity workers are often vulnerable to social engineering attacks.
the very very first thig to do is to learn Object Orientated Programming (if you haven't).. then you might want to start learning the MVC pattern... and then you must decide either you star using frameworks (like cakePHP, Symphony,Zend) or you prefer using CMS (like joomla or wordpress)... on the process you might also want to learn javascript using a framework (mootools, jquery or prototype)...
Edited: i forgot about databases and sql!! wow.. there's a lot to learn!
The only way to become a good programmer on a certain platform, is to study something more than just tutorials. Read a book, at least. Then the rest comes with practice.
A good way is to also learn a specific platform (depending on what they work with). Some work with Wordpress, so once you know basic PHP and how to use it with databases, and how to work with databases, you would be able to quickly make some basic information websites. Others use Joomla, Drupal, DLE, to quickly build websites, without having to hurt their heads with full backend and frontend architecture. If you need a more general approach, to be able to make more specific web applications, use frameworks like Zend, CakePHP, Symfony, CodeIgniter.
Also, besides knowledge of PHP, to build a small website by yourself, you will also need to know HTML, JavaScript (with AJAX, possibly a framework like jQuery), SQL.
And last but not least, you will need to learn how to protect the site against XSS, SQL Injection and other security threats.
Learn Object Orientated Programming (OOP for short).
Watching any programming tutorial is different than watching any movie. You need to have practice and have experiments form different angle of codes. Prentice and research is only way to get into the deep of any language. If you think you have well understanding about php then try to make some small application like phonebook which have database connection. After that you can move for any frame work like laravel, cakephp. But I always recommend to do at least one small project with raw php before move for any framework because when you come from raw php you will start loving working with frameworks otherwise you will may feel boring to learn again something new as my point of view.