This question already has answers here:
Closed 13 years ago.
Possible Duplicate:
What Should I Learn After PHP?
Ive been doing PHP for the past 2 years and I'm quite comfortable with it, I can do most things and I'm finding it harder to find challenges. Which is good I suppose.
But as I become more experienced I'm hearing bad things about it. That in the grand scheme of programming it's a baby.
So what would you recommend I move on to? I thought mabey Java or C. But you guys are the experts. What do you think?
Also, could you suggest some good places to learn.
Take anything you hear about PHP with a pinch of salt. Whilst it can be used as a simple scripting language, you can write entire object-oriented web applications with it (PHP5 adds massively to this).
PHP is my language of choice for many web projects - and not just because it's the one I know best, I've been using C#.NET, ASP.NET and WPF for much longer than I've been using PHP).
It depends on what you want to do, you choose the right tool for the job. PHP is a fine choice for rapid web development.
However, even if your day job requires you to stick with PHP, learning another language by doing some toy projects will actually improve the way you write PHP. Pick a language, try it out for a few months, then try out another!
What about participating in some kind of Open Source project ? Now that you have some experience, you would probably be able to help doing nice stuff ;-)
It would also be a rewarding / interesting experience :
not working alone is often better -- you learn more stuff, and you are more motivated
working on a big OSS project looks nice on a resume, too ;-)
It depends on why you want to move really. Are you looking to get past PHPs alleged flaws and produce better webapps, are you wanting to improve your programming ability/style/technique or do you want to learn a different style of programming?
You probably only want to learn C if you intend to move away from web-development. Java probably isn't going to teach you anything that you don't already know from PHP, assuming you write OO PHP code of course.
Learning one of Python/Ruby/Javascript would let you learn about functional programming - if that's your goal.
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I started learning programming 4 months ago. So far I already know some javascript(and jquery), php, ajax html and CSS. Yesterday I saw for the first time in one of the stack forums a question about PHP frameworks (zend, codeigniter...etc).
I hope these questions are not very stupid, because I am a beginner so I don't know much about this world yet, but my questions are:
1- Do I need to learn how to use a php framework if I just one to build ONE website?
2- Do websites nowadays rely more on AJAX + some php OR just PHP + some javascript?
3- How long does it take to learn and master a php framework like zend?
1) You don't need to learn a PHP framework, and in fact if it's the first website you've ever built I'd suggest building it without a framework just to get a feel for how PHP works when building a site. This way you understand things like database connections, session management, etc. that is often done behind the scenes with frameworks. Then later on try building it with a framework to get an idea for the design patterns and other features that a framework has built-in to avoid code repetition, security holes, etc.
2) I don't know what the difference between AJAX + some PHP and just PHP + some javascript. AJAX is a part of Javascript, it isn't a separate technology on its own.
Some websites use a lot of AJAX, some don't. It really depends on what you want the website to do and your particular design: AJAX can provide a smoother feel to the site, but can have complications when it comes to things like back buttons and bookmarks.
3) Depends on what you're doing with the framework: if you're only using 10% of the features you certainly won't become a master in any amount of time. It also depends on the complexity of the framework: I haven't used Zend but I know that the more complex the framework, the longer it will take you to learn it.
Learn as many thing as you can. PHP is a good start, becouse it's very popular and easy to learn and use. There are many great frameworks written in PHP (Symfony, Zend, Kohana, etc.). However, it's not a nice, well designed language at all. Keep it in mind, don't stop at php, learn it then make progress.
b) You will be able to build a large variety of sites with PHP+JS+HTML
ps.: AJAX is a technology, and as a knowledge, it doesn't worth so much as is.
Ajax is just a technology to call server side scripts from Javascript. The server side script being PHP. So, if you intend to use Ajax, you need to know PHP.
As for PHP frameworks, its good to build a few website from scratch using PHP to get a better understanding, but eventually, its better to adopt frameworks. Frameworks implement a lot of the functions and methods you need. No point re-inventing the wheel.
The answers to your questions are very subjective, but what I suggest is:
No you should not learn a framework to build one website. Just go and build it in any way you can. Frameworks usually carry a lot of additional concepts and methodologies. You will have to invest quite some time to understand how they work, but it will be really hard to understand why they work that way. Doing a website is a great experience, so just go and build something.
Lets say websites mostly rely on HTML / PHP / JavaScript. Ajax is just an additional capability, which you are already focusing too much. It's great that you know what Ajax does, but you should concentrate more on the essential things, like number one.
Lets say it takes two years of constant interest in the field. So at first you learn the syntax of PHP, then you start to know how HTTP works, then you experiment with HTML and JavaScript/jQuery/Ajax a bit more, then you try a Framework. You keep trying until you become a master. Zend Framework is one of the most comprehensive, so it will take a while to study how it works and all the related technologies it brings with it.
My final advice is to stay focused, build something, see what challenges it brings, solve those challenges and eventually become a master. Good Luck!
Question One - The short answer is: it depends on the type of site you're building. The frameworks you're talking about were built to streamline web application development, which make extensive use of databases and object-oriented principles. If you're planning on building a site with mostly static content, I wouldn't bother learning a framework just yet.
Question Two - Again, it depends on the site. The concept of AJAX has many applications, but most sites employ it to make a site more interactive (e.g. not refreshing the page to load new content). For sites with primarily static content, AJAX has fewer uses.
Question Three - It can take a while to 'master' a framework. I'm not that familiar with the ones you mentioned, but learning a framework is less about understanding it's syntax/quirks and more about learning how to approach a problem their way. Again, it depends on what you're doing.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How to increase my “advanced” knowledge of PHP further? (quickly)
I have just finished learning the basics of PHP and MySQL and I need some kind of practical experience to improve my skill or some kind of professional job. Any idea how to do this and expand my knowledge as a PHP developer?
Work on open source projects or start your own. The benefits are countless, but specifically:
You'll work with more seasoned developers who may offer you advice
You'll have work you can show others that people actually use
You'll gain more experience with your tools
I would suggest:
Offering your service on craig's
list 'pro bono.'
Take a topic of interest to you and design a web site support it. For example, Let's say you like wine. Write a website and db that tracks wine, vintages, purchases, opinion,s etc.
Also I recommend the Heads First PHP book
To get a professional job you gotta really be able to develop in PHP. Think about some problem and try to find a solution in PHP for it.
I don't know maybe start with a nice little todo list web-app. Try to get your ideas on paper (i.e. what features you want etc.) and then start coding it. Keep coding until you finish the app.
Your best friends while developing will be http://php.net and StackOverflow.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Why use a framework with PHP?
Hi, usually all the projects I do I work or with my own framework or I start them from zero. Why shouldn't I do this? or is better to keep doing it this way?
I mostly work on php, what suggestions do you have to change this? cake, joomla or another one? or just keep it this way?
I'm a little untrustfull to others people code :S
Thanks and sorry for the english :D
If you go with frameworks, it is easier, better, faster, stronger!
No, really. With a well-established framework you cut down your development time, you know that hard stuff has already been thought about, and you can just do what your app needs to do, without doing things that every app needs to do.
I'm a Ruby guy, so I'd vote for Rails (big) or Sinatra (small). I did work in PHP and it was just... ick. If you swing the Python way, Django (big) or CherryPy (small) would probably be the suggestions to try.
The disadvantages, not many. It is a bit slower than not using a framework, obviously. But not by much. And if there is something that a framework does not support, it can get hairy. However, there's really not much you can want that e.g. Rails does not do.
As for being suspicious of other people's code, there's really no need. It is open-source, bunch of people look at it and if there's something seriously wrong it would have gotten fixed a long time ago. If you are still suspicious, you can join them. It is a better investment of your time to help debug an existing framework than design, develop, test and debug one from scratch.
I do understand the whole "I want it to be all mine" principle but it goes against lean development practices. I often find myself writing things from scratch because I just want to learn but often end up only getting the "tool/framework" done instead of the project I wanted to actually complete.
Personally I've used codeigniter and I find you can do just about anything you want including rewriting things that don't meet your needs.
If you use a framework you can concentrate on what really counts for you. It doesn't make sense to write the authentication part, with the risk to write code that is subject to security issues, when there is already a framework that implement the authentication part.
What it's really important for you is the site, or Web application content.
There are many PHP frameworks you can use; you just need to check which one is better for you.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
this is maybe a silly question but I am really wondering if it is possible to use a MVC framework such as Zend without learning the language first? Thank you for your help!
You can't learn Zend Framework without learning PHP. That you might have guessed.
After, you don't need to have a degree in PHP to learn Zend Framework.
You can learn them both together.
Short answer: No.
Long answer: A framework serves to speed up development, by giving you a set of tools to handle mundane and repetitive tasks. Some frameworks also enforce a specific programming model, but their primary task is always helping you write faster and cleaner code.
Having said that, it becomes quite obvious that anyone thinking of using such a framework, first needs to understand (globally) the language it's written in. You don't have to know every available function by memory (who does?), but you will need to know the basics at least. As I said, a framework speeds up your development. It can never replace it.
If you write poor code without a framework, expect to write poor code with a framework.
If you can't code at all without a framework, then you won't be able to code with one either.
It is possible to lean MVC in general without knowing a programming language. Learning a specific framework will mean learning the language in which it's written. So, yes, it is possible to start learning Zend Framework without knowing about PHP, but be prepared to learn PHP on the way.
I would say YES it is possible, but provided you have experience in other languages or framework. However you cant really go far, and you probably learn PHP along the way in exploring the framework. From scratch will be kind of tough though.
To add:
I was learning Drupal without actually learning PHP prior. But in the process, I kind of figured out bits and pieces of PHP as I've knowledge in other languages.
Sure you can. You might find it slightly more difficult though if you're not familiar with the language. It depends on how much programming/language experience you've had previously. PHP is a relatively straightforward language to pick up but obviously if you've not done development before with something with similar constructs and syntactical similarities, then you're going to struggle.
Zend can be a complex beast however, and I'd recommend at least playing around with PHP to start with so you get an idea of how the language works, before you dive head first into the framework.
I think you'll struggle like hell, even if you do manage it. Frameworks are tools that encourage good programming standards and give you access to libraries for which you can call functions into your applications (to avoid writing everything or hard coding). If something breaks you may have to manually fix something, what are you going to do if you can't program to fix problems that occur within the framework (hire someone?)?
I suggest you go to the php website and buy a book on the language to get your feet wet. I suggest starting with the essentials of any language: variables, arrays, functions, methods, object oriented programming, libraries, etc. At least study those topics (especially OOP and write a small project with them) before messing with frameworks. Many use OOP and you will struggle if you don't even know how to program in the language, although if you knew how to program it would be less of a struggle than if you didn't know either OOP/Programming in general.
It's not a skill you develop over night, write code, read code, debug code, and repeat until you're familiar with the general concepts.
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 5 years ago.
Improve this question
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
I recently introduced Python to my company, which does consulting work for the Post Office. I did this by waiting until there was a project for which I would be the only programmer, then getting permission to do this new project in Python. I then did another small project in Python with similarly impressive results. In addition, I used Python for all of my small throwaway assignments ("can you parse the stats in these files into a CSV file organized by date and site?", etc) and had a quick turnaround time on all of them.
I also evangelized Python a bit; I went out of my way to NOT be obnoxious about it, but I'd occasionally describe why I liked it so much, talked about the personal projects I use it for in my free time and why it's awesome for me, etc.
Eventually we started another project and I convinced everyone to use Python for it. I took care to point everyone to a lot of documentation, including the specific webpages relating to what they were working on, and every time they had a question, I'd explain how to do things properly by explaining the Pythonic approach to things, etc.
This has worked really well. However, this might be somewhat different than what you're describing. In my case I started with moderately small projects and Python is only being used for new projects. Also, none of my co-workers were really Perl or PHP gurus; they all knew those languages and had been using them for awhile, but it didn't take much effort for them to become more productive in Python than they'd been before.
So if you're talking about new projects with people who currently use PHP but aren't super-experts and don't love that language, then I think switching to Python is a no-brainer. However, if you're talking about working with a large existing PHP code base with a lot of very experienced PHP programmers who are happy with their current setup, then switching languages is probably not a good idea. You're probably somewhere in between, so you'll have to weigh the tradeoffs; hopefully my answer will help you do that.
If the mandate of the new lead is to put the house in order, the current situation should likely be simplified as much as possible prior. If I had to bring things to order, I wouldn't want to have to manage an ongoing language conversion project on top of everything else, or at least I'd like some choice when initiating the project. When making your recommendation, did you think about the additional managerial complexity that coming into the middle of a conversion would entail?
#darkdog:
Using a new language in production code is about more than easy syntax and high-level capability. You want to be familiar with core APIs and feel like you can fix something through logic instead of having to comb through the documentation.
I'm not saying transitioning to Python would be a bad idea for this company, but I'm with John--keep things simple during the transition. The new lead will appreciate having a say in such decisions.
If you'd really, really, really like to introduce Python, consider writing some extensions or utilities in straight-up Python or in the framework. You won't be upsetting your core initiatives, so it will be a low/no-risk opportunity to prove the merits of a switch.
I think the language itself is not an issue here, as python is really nice high level language with good and easy to find, thorough documentation.
From what I've seen, the Django framework is also a great tooklit for web development, giving much the same developer performance boost Rails is touted to give.
The real issue is at the maintenance and management level.
How will this move fragment the maintenance between PHP and Python code. Is there a need to migrate existing code from one platform to another? What problems will adopting Python and Django solve that you have in your current development workflow and frameworks, etc.
It's really all about schedules. To me the break should be with a specific project. If you decide your direction is Django then start new projects with that. Before you start a new project with a new language/framework, either make sure that you have scheduled time to get up to speed in this new direction, or get up to speed before using on new projects.
I would avoid going with a tool of the month. Make sure you want it to be your direction and commit some time/resources to learning enough to make a good decision.
Well, python is a high level language.. its not hard to learn and if the guys already have programming knowledge it should be much easier to learn.. i like django.. i think it should be a nice try to use django ..
I don't think it's a matter of a programming language as such.
What is the proficiency level of PHP in the team you're talking about? Are they doing spaghetti code or using some structured framework like Zend? If this is the first case then I absolutely understand the guy's interest in Python and Django. It this is the latter, it's just a hype.
I love Python and Django, and use both to develop the our core webapps.
That said, it's hard to make a business case for switching at this point. Specifically:
Any new platform is risky compared to staying with the tried and true
You'll have the developer fragmentation you mentioned
It's far easier to find PHP programmers than python programmers
Moreover, as other posters have mention, if the issue is more with spaghetti code than PHP itself, there are plenty of nice PHP frameworks that could be used to refactor the code.
That said, if this developer is excited about python, stopping them outright is probably demoralizing. My suggestion would be to encourage them to develop in python, but not the mission critical parts of the app. Instead they could write some utility scripts, some small internal application that needs doing, etc.
In conclusion: I don't recommend switching from PHP, but I do recommend accommodating the developer's interest in some way at work.