Related
I've now got some very good understanding of (X)HTML and CSS, and plan to move on. My next choices are PHP and JS (and don't know if I'll ever end up learning one of them, but I would love to).
So, I need to choose one of them. I have learnt that PHP is server-side programming and JavaScript is client-side programming, and I am NOT asking you to compare the two of them for me. What I would like to know is, can I do anything (or most of) in PHP that can be done with JS? (or put it this way, can do everything people use JS for, on the server-side with PHP?)
Instances include, using PHP instead of JS in web themes, real-time content display (as in live blogging, live comments etc), effects etc.
This might seem dumb, and there's definitely a reason why people use JS in all the above instances, but since I cannot (really) learn the two of them, thought I should ask for some advise here.
EDIT: Would it be possible to reload only a part of a web page (not the entire web page) every few seconds with PHP? That should be good enough for the real-time application that I am planning.
If you absolutely don't want to learn both, then learn Javascript. There are possibilities to implement a Javascript-based backend with node.js.
I advise you to at least try PHP since it is widely used - maybe even at your company.
For nice user experience (dynamic menu, ajax, effects, ... ) you need client-side programming and for dynamic content you (almost always) need server-side programming.
In short, you need both.
PHP and JavaScript cannot really be compared in the way you're asking...
Both are powerful in what they've ment for and they have a very similar syntax. If you can't absolutely study more than one of them, learn PHP in my opinion. I coded with PHP for almost 10 years before really getting into JS. I would say PHP is the food and JS is the spice.
In order to create AJAX web apps Javascript AND a server-side language is required.
No, you can't. PHP only works on the server side. Once you've delivered content to the client, PHP can't do anything until the page reloads or the user loads a new page. If you want to do anything client-side in between, you need JavaScript (this includes loading content in real-time, doing a lot of modern UI stuff, etc).
Either learn both PHP and JS or use a blogging CMS and use a minimal amount of both.
If you put enough effort into it, you can do almost anything server-side using lots and lots of page reloads. You can also generate arbitrarily complex dynamic content using Javascript.
But it's a lot easier to do minor changes to a page's content from Javascript, it's only possible to do animations and effects from Javascript. It's also much easier to directly access the database from server-side code – there might be pure-javascript drivers for SQL databases, and you could use a NoSQL databases that's accessed using web services, but both are relatively uncommon techniques.
I have a thought regarding your original question/situation. I know this is about four years tardy, but I thought I should throw in my two cents for people who are looking back on this conversation as a reference from Google like I am. In your situation, because you are a blogger who is trying to save time when it comes to programming, I would recommend looking into WordPress (the .org version, not the .com). It is a sort of marriage of WYSIWYG blogging/website creation and programming. It takes care a lot of the back end stuff (including Javascript, PHP, and more), but also leaves it open for you to edit if you so desire. You probably could get away with using Wordpress as a total non-coder, but with HTML and CSS, you're already off to a great start. WordPress is super simple to learn and amazingly powerful. If you do take this route, I would suggest learning PHP as an asset because that is the language that WordPress runs off of. If you know PHP and are using WordPress, you have vast potential, not to mention that speedy blogging is a snap. If you don't feel the need to have whipped everything up from scratch and want to work faster, give WP & PHP a try. They'll take you a long ways.
I am totally new to PHP, I want to know whats the difference between PHP,CakePHP and Joomla.
Which IDE is most commonly used for developing PHP based web applications.
How Ajax is implemented in PHP, is it through JQuery only or there's something more to it.
Which will be the ideal book that covers most of the basic and advance concepts.
PHP is a programming language.
CakePHP is a framework written in PHP.
Frameworks establish a basis for quickly developing applications by providing you with a lot of functionality that you would have to write in plain PHP for most applications anyway. For example, secure database access, session management or pagination. These are all tedious things you have to care about, but that are basically the same for every app. It also establishes a certain structure for your project.
Joomla is a CMS, a content management system, written in PHP.
CMSes are pre-built systems you can use as-is, that allow you to manage your content. They're extensible and customizable, but often not to the degree that an app written in plain PHP or using a framework can afford, or not easily so. There's a lot of functionality in there already though that you don't need to write at all.
AJAX is not implemented in PHP at all.
AJAX just means that Javascript asks your server for data and the server delivers it.
A typical PHP page responds to requests with a complete HTML webpage. For AJAX requests your server instead responds with XML, JSON or plain text, whatever you decide. It works exactly the same way as responding with an HTML page.
Javascript is a programming language.
jQuery is a library written in Javascript.
See framework, the definition is almost the same.
For IDE recommendations, do a search.
PHP is a programming language
CakePHP is a framework
joomla is a CMS
AJAX - php is executed server-side and as such isn't something "implementing" ajax. The original call comes from client-side javascript that is not limited to JQuery. JQuery is a javascript library.
Ajax isn't implemented in PHP. Ajax is client-side technology. PHP is server-side. I started using Eclipse's PHP IDE, but I found the debugger to be more of a hassle than it was worth. I'm still using the IDE, but I'd probably be just as well off with a plain text editor.
You might want to check out Zend (www.zend.com). Most of their tools are commercial based, but they have some free tools that help you run PHP on your own machine.
I don't personally use a PHP framework, so someone else will have to help you with that one.
When I was first introduced to PHP, I was directed to these free instructional videos.
While they don't directly address your question, I'd be wrong to not perpetuate the kindness by sharing them with a new, novice enthusiast.
Good luck!
You are asking a lot of questions at once, which are fairly simple questions but the real answer is you need to learn a bit more about web development in general in order to give yourself a broad knowledge of the web development ecosystem. Stack Overflow is not good at giving you 'how do I program in PHP', it's better for specific questions like 'how do I sort an array by string size' or something like that. For learning how to program, you need to learn this yourself.
The wikipedia page on web development gives a very broad overview of how things like server-side, client-side etc fit together - so broad as to not be particularly useful for those wanting to achieve anything in particular, but suitable for people coming across web development from not knowing the difference between an application and a programming language. An equally broad knowledge of http is also helpful, and since you brought it up, it also looks like you are having difficulty understanding what ajax is.
For PHP specifically, the PHP manual contains everything you need for all but the most obscure questions, providing you have picked up a few programming skills already - and if not, I recommend you take a course or something, since if you haven't been programming since you were a child you probably won't take to this kind of thing quickly.
A little-known but powerful solution for AJAX in PHP is Xajax. It allows you to call PHP functions asynchronously as AJAX calls, making it by far the most familiar solution for people familiar with PHP but not Javascript.
Beware, however, that a huge portion of the users are based in Europe so the help forum can be VERY difficult to understand and official documentation is similarly spotty.
I personally always advise against using a book to learn--stick to quality websites (which ones become very obvious very quickly) By the time something is put into print, it's usually out of date or has been superseded by better technique. While the basics don't change much, there are many day-to-day things that experienced developers use regularly that you won't find in a book. I also advise learning the basics of development first (object oriented theory, logic progression, arrays, etc) before learning the specifics of any language. PHP.net can define specifics all day, but it's far more difficult and time consuming to learn MVC theory on the fly. Finally, if you have some money, I can't say enough good about Zend's certification training.
I'm starting to architect a quite complex web application. The implementation is probably going to be done in PHP, though if there are impressive reasons to choose a different environment I might be convinced.
I've looked at tools like Symfony and CakePHP. The problem is that it feels like they're relatively low level for a modern Web 2.0 application. They handle the basic things like MVC and scaffolding, but not the more advanced UI elements that I'm looking for. Here are some of my requirements:
Single page architecture. With minor exceptions, there should be no page refresh. All actions are done via ajax, the way it's done in gmail, and to a lesser extent in Facebook.
Ajax layout and widget handling. Not only the application doesn't refresh the page, but the developer can specify the layout and load various widgets into different parts of the page. This is somewhat like iGoogle, but should be better integrated.
Support both on the client side and server side for AJAX widgets. It should be trivial to display the result of a select statement in an AJAX table/array like http://developer.yahoo.com/yui/datatable/. This should also apply to other widgets including
Trees
Menus
Forms
Speaking of forms, there should be easy integration with client side validation
Signup/Authentication/Authorization. Including all the housekeeping things like forgot my password, CAPTCHAs, etc.
There's more, but I think I've given enough details so that you get an idea for what I'm looking for. Basically, I'd like to engineer a modern Web 2.0 app and skip writing, testing, debugging things that most web applications need to do. And yes, I know I can take YUI or jQuery and slap it on top of one of the regular platforms, but then I'd have to write all the glue. Now if there are modules that do this, that would be interesting.
So if you say, take Symfony + modules xyz + jQuery and there's your answer, I'd be happy to hear that.
Finally, in terms of priority, I'm looking for something that's scalable, reliable, well engineered more than something that's easy to learn and deploy.
Since you are looking for all things AJAX, why not try GWT? Its not PHP I agree, but it makes writing AJAX applications easy for developers.
I agree with #Iznogood. What your looking for is not actually a framework but a talent.You can make any framework as "igoogle-ish" as possible if you know what your doing.
I suggest look for a framework with a huge and active community like, CI, Cake and Jquery. Search/ask the community for the specific things you need. Plug it in and Presto!
But I'm afraid you'll have to write some of it.
If you don't mind using Java, there is ZK:
http://www.zkoss.org/
I'd prefer using this over GWT.
In php, you might want to consider Cjax http://cjax.sourceforge.net/.
It is MVC oriented, and has a very generic API, with full support for customization, including the development of plugins (There is a full Plugin API available, including documentation, Plugins can be built in PHP and JavaScript in combination -- see uploadify and validate plugins).
It can access all JavaScript functions, Objects and proprieties, and elements properties and functions from PHP server side, with one line of code.
In Cjax,
you can execute ajax actions, inside controllers (ajax requests) - without a line of JavaScript. this allows you to fully function without refreshing the page. It also allows you to access all Js objects from PHP. A good sample that reflects this is the "recursive ajax request" see that demo. The API can be used on page load, when the page first loads, and within every single ajax request.
Do take a look at the documentation and to the 20+ demos included, and no where you will see a single line of JavaScript. It allows you to manipulate elements, containers, request ajax, submit ajax forms, creates overlays, upload files through ajax, all from the server side. Take a glace at the API Table.
It has support for both, server side ajax, and client side, (see plugins JavaScript Documentation)
It plays nice with jQuery - the validation plugin in jquery is full executable in PHP without a line of JavaScript (see http://cjax.sourceforge.net/examples/plugin_validate.php without any custom line of Jquery inside the framework, it's all plugin's work). Ajax Responses from Jquery also get processed by this framework automatically, so using Jquery's Ajax function API wise, is the same as if you were using the Framework's Plugin's JavaScript Ajax Functions.
And you would just have to take your time learning more about it, because it has quite a few more tools that I am sure you'd find useful.
Currently there are two official releases, the generic release and
there is an official release for CodeIgnater of this framework (and it is the leading ajax option for codeignater) , and works great in conjunction other PHP Frameworks and without them.
Signup/Authentication/Authorization. Including all the housekeeping
things like forgot my password, CAPTCHAs, etc.
This is something that you can build within an ajax controller, the framework itself its meant to be a generic "AJAX" framework, so if you are looking for none ajax features, you will need to build them or integrate other PHP Framework with Cjax (such as Codeignater).
I do not know if this matches all of your criteria, or if you ever will find one. However, I like the Zend Framework myself.
As for the UI and AJAX portions - the server side technology matters little, and it's more about browser-side technology and interaction mechanisms, as well as DOM manipulation.
jQuery is my favorite for that. As for the PHP back-end, I tend to develop it with my own codebase that's grown with me over the years.
But all this takes a lot of practice, knowledge, education, research, reading, and posting questions on StackOverflow.com ;)
I would recommend symfony PHP framework since it has very good support for every feature you mentioned, and it can be easily integrated with Zend Framework - as of version 2.0 coming this year it would be integrated in the package. You can easily set symfony to handle AJAX requests so that it would be perfect transparent layer handling server side.
For me, if you look at THAT heavy AJAX, I would recommend searching for some good JavaScript framework - such as Ext.JS - that would handle all client side functionalities.
For the front-end part of your app, you might want to have a look at SproutCore ( http://www.sproutcore.com/ ).
Building a Web application with SproutCore feels more like configuring components than writing code.
There is no glue code.
On the backend all you have to do is accept and emit JSON.
Depends what sort of level you're looking at. If by 'framework' you mean something like Zend or Symphony, then to be honest all the big ones are about as good as each other. They all have strong points and weak points, but none will really meet your criteria.
But your question implies you're looking for something more than that kind of framework. Maybe you're looking for a full-blown CMS platform like Drupal, Joomla or Wordpress?
In that case, again, you need to consider your needs verses the capabilities and pitfalls of each system.
Drupal, for example, has masses of modules, is very powerful, and easy to write your own modules, but isn't object-oriented and doesn't really do MVC, so if that's your bag then you may find it hard to get on with. Wordpress is much easier to get going quickly but is less flexible once you start getting deeper into it.
But again, they all have strengths and weaknesses. If one was clearly the best, it would be an easy choice. But at the end of day perhaps it's better to have several good quality options to choose from.
Have a look at Ext JS, it is pretty good. If it is a commercial project you are doing it isn't free but not too expensive either. It also has a GWT version if you prefer that.
This is only for the front end but it is not too complicated to use any backend that can emit json.
CakePHP is pretty good
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Back in the 90's I used to develop websites using Cold Fusion. We also still used tables for most of our page layout, hehe.
I just started getting back into website development again seriously. I'm getting a pretty good handle on the basics with CSS and starting to add Javascript. I'm guessing that I will eventually add PHP as a modern replacement to my CF skills.
Right now I am using an old copy of Cold Fusion studio for my editor and of course Photoshop for my graphics. I have also discovered Firebug and found it to be very helpful.
I was wondering if the community here could give me some pointers as I start back out in this field. Do you have any software suggestions? A new editor I should use? Other debugging tools? Languages you would recommend?
Any comments or ideas that would help a website developer who is starting out would be greatly appreciated. Thanx!
You might consider Eclipse for your IDE. It's free, open source and pretty full-featured. Also, you'll want to implement source control. I like Subversion, which integrates nicely with Eclipse.
If you're looking to update your image editor and you don't want to spring for Photoshop's licensing fee, GIMP is very much improved, open-source and free.
You may want to investigate the various CMSs and frameworks out there. It's possible that one or another may suit your target market. And they can speed up development significantly once you learn their quirks.
Also: JQuery. Don't spend your javascript coding time dealing with cross-browser issues and common tropes.
I would look at Net Tuts+, Think Vitamin, and Smashing Magazine to get back up to speed on what's fresh.
You definitely want to look into a framework. You'll be disappointed with PHP out of the box if coming from ColdFusion, it's not nearly as friendly. This is assuming you're going to use it for database applications, otherwise it really doesn't matter.
Of course, I'm obligated to tell you to check out Ruby on Rails.
I'm a big fan of jQuery for elegant, client side cross-browser javascript.
If you want to look at some "modern" concepts on the server side, REST is getting some airplay, and cloud stuff like Google App Engine can make for a really efficient development path (scalability 'for free').
But I still stick with the old-school IDE - syntax highlighting text editor. Or eclipse, which sometimes isn't much better ;)
I agree with finding a framework. As a general editor, I can't live without notepad++ - http://notepad-plus-plus.org/
It is a text editor, but it does so much. It has code highlighting for many languages - it is an indispensable tool for me.
For CSS I would recommend reading CSS Mastery for a nice overview including browser differences / bugs.
As far as the software is concerned, I still use Dreamweaver for my old, template based sites, but I´m moving to NetBeans for my new sites. Apart from all the expected features, NetBeans has nice ftp integration, one of the reasons I started using Dreamweaver years ago.
The Opera Web Standards Curriculum is a great (re)start for writing correct HTML and CSS and JS. Read it at your own rythm (I mean pace, sorry for my english).
IE6:
Just give up with IE6 if you can (if your clients don't ask specifically for its support). It'll give you plenty of time to learn better things.
If you work for administrations or companies that work for them, that won't be the case; prepare for severe headaches.
Position is everything is a great resource. Don't try to understand everything but at least learn to know and recognize those IE6 bugs. A doubled margin, 3px margin, content seen twice, disappearing content are very well known and documented bugs but if you don't know here they come from ...
Conditional comments and hasLayout (zoom: 1; in one instruction) have been better explained elsewhere I believe, because P.I.E. is really an old site (though still useful).
Page layout:
If you have used tables, spacer.gif and are new to web standards like CSS 2.1 used the right way, you'll have a hard time for layouts displaying correctly cross-browser even if you know hot to style entire blocks in the page.
Don't bother to reinvent the wheel, use resources like HTML Gala. Pick up the layout you need depending on fluid/fixed width, number of columns and whether their width is fixed or not and whether there is a footer or not, then understand how/why they did it but don't try to do it from scratch: it's just too complicated when you start to use CSS.
Tools:
a good text editor
Firefox and great extensions
and you're done. Quite :)
Chrome also has extensions, keep an eye on it in a few months. For now nearly everything needed by a webdesigner/webdeveloper exists on Firefox and some of them on other browsers too.
Firebug that you already cited. Explore its tabs, its select boxes and breadcrumbs, where you can edit things live, etc. And I heard you like extensions so dev created extensions for this extension (meme ©Xzibit :)), check for extensions to Firebug. I use Pixelperfect and CSS Usage mainly but others are useful too.
Web Developer Toolbar is the other must have extension. Be sure to try every option at least once, there's even a gem in the last menu, first option that only a few know.
QuickJava allows quick enable and disable of Java, Javascript, Flash, Silverlight and Images from the Statusbar without having to open any dialogs.
MeasureIt to measure width and height of an element or margins.
ColorZilla brings a color picker (Shift-Esc)
Fireshot for snapshots and commenting them, useful if you want to communicate with a client or a designer, write documentation or for your portfolio.
Others
source control (let's avoid the pain of "It worked 3 days ago/I just deleted the wrong file aaargh")
two offline backups that won't get robbed/flooded/burnt with the rest of your house/office. The second one can be an USB key/HD with Truecrypt given to family or friends, along with a password only known from your wife/husband and your parents or children for example. You can keep the first one with you (encrypted is better if you get robbed).
CMS: you can test Drupal, Joomla and Wordpress as a beginning. Magento for e-commerce. Numerous plugins for each one but their quality may vary!
I'd look at Net Beans as an editor/IDE if you definitely want to go the PHP route.
I'm a .NET developer, so maybe i'm biased but i'd look into the .NET framework, and specifically ASP.Net MVC (go for c# if you can in my opinion)
It all depends on what you want to do in the longer term, and if you want to do this just as a hobby or to work as a full time developer.
In the area of the UK i'm in it's a bit harder to find PHP jobs in the larger companies, many are tied in with Microsoft and rely on their technologies such as .NET and MS SQL etc.
Are you looking at taking on more of a design role, css/xhtml coding, or writing applications, web services etc?
Note, just to clarify I also use PHP for many projects outside of full time employment, you can make a living using most technologies, so go with the ones you prefer.
Also check out Tizag for loads of useful, easy to follow tutorials that can quickly get you up to speed on the basics.
Whichever route you go down, definitely get familiar with the jQuery javascript library, it's very powerful and many of the basic functions it makes available are expected in websites these days by clients i've found lately.
I've not looked at it myself yet, but the new PhpStorm IDE seems to be getting a lot of praise at the moment
Futher to the nettuts+ answer.
If you're on a mac, i can highly recommend panic's coda http://www.panic.com/coda. It makes writing css a breeze, even though i hand write mine. However if you're strapped for cash a free alternative to that is textmate http://macromates.com/
Firebug is a fantastic little tool, and there is also web developer toolbar https://addons.mozilla.org/en-US/firefox/addon/60/, which is also very very helpful! It has built in links for validating your html and css with w3c.
Languages, definitely PHP imo. I started out in ASP.NET, found it good but i just feel more comfortable in PHP, my suggestion for you is to try them all out and see what works best.
Also when you feel comfortable, take a look into the kohanaphp framework (kohanaphp.com/), its a fantasticly simple framework which as someone else put it, is unobtrusive, you can use as much or as little of it as you like.
Finally my best advice is to just spend every waking moment trying out new things, like making a html page and styling it, making a contact form that kinda thing, i found just messing around is the best way to learn a language.
Hope this helps you get started :)
ColdFusion has evolved nicely since the 90's, check out the details of version 9 before abandoning it. Also, consider CFBuilder for a nice IDE for ColdFusion.
ColdFusion 9
CFBuilder
here are some helpfull links.
css-tricks.com
net.tutsplus.com
ajaxian.com
webmonkey.com/category/javascript
smashingmagazine.com
(i visit them daily to be up to date with web Design / development).
I think there are two things that mark modern web development:
Web development frameworks
JS libraries, mainly jQuery
Although most of the concepts behind today's Web development is not new (MVC structure, AJAX...), re-discovering these led to a shift in how we do things, and brought back the trust of veteran developers in it as an effective and serious medium.
I definitely recommend that you dive into Ruby on Rails. Learn the main principals and concepts underlying the framework: reusable modules, elegant MVC structure, templating, RJS...
(Alternatively, you might like to check cakephp, the PHP cousin of Rails, which inherits most of the family traits)
Eventually, when you play enough time with it, come to like it and understand it well, you'll stumble upon other frameworks that might suit you more (for one reason or another). My experience moving from Rails to Django (Python), then to Google AppEngine (Python or Java) was nice and rewarding (in personal satisfaction, that is).
That's for the back-end.
Then you come to the vast world of ninja-style-ultra-useful-and-still-fun jQuery (and its numerous plugins) where the joys of web development continues.
Enjoy the ride!
I've learned CSS and HTML, what should I learn next if my goal is to create templates for Joomla and WordPress? Ajax? PHP? JS?
I poked around and haven't found a question that is alike so I posted this one
Both Joomla and Wordpress are PHP applications, so in order to understand what exactly happens with your templates and in order to override template parts succesfully, it surely is a good idea to learn some basic PHP.
Now Javascript and AJAX are two different pairs of gloves and the terms belong to two different levels of abstraction.
Javascript is a scripting/programming language while AJAX is a technology which makes use of Javascript. Learning Javascript is definitely a MUST if you're in the UI design area. And once you know it, using AJAX (asynchronous javascript communication with the server) scripts will be one of your possibilities.
So, if I were you (but it also depends on the task at hand) I would learn Javascript (jQuery as a library) first and later look into some basic PHP.
From your question the best answer I can give is:
Install Joomla & Wordpress, then start tinkering with the templates
See how the templates are structures what the different template engines are
Modify the default templates to create some changes you can see.
Add jQuery if you so choose, and try some JS/Ajax tutorials (jQuery has plenty of demos)
View the completed changes in your CMS templates.
Otherwise from your question going to read about something, isn't going to help you 'learn' you need to start with baby steps and work your way into more complex examples. Then just exmplore with either technology and see how others are doing it. Always review and correct, and learn from your mistakes.
A little bit of php will surely help you, but if the developer (or the cms) is good you'll never have to edit the php parts (you should see just many foreach, while, if, else loop/condition)
Js (ajax) is used (sometimes, mis-used) to handle some layouts elements, so yes, take a look at jQuery, but remember: never rely just on javascript.