The company i work for are looking to move their php web application over to a framework. I personally haven't had much experience with php frameworks at all, so i need to read up on them and learn which ones are best.
My question is, is there a quick way to migrate a standard php/css/html web application over to a framework without having to rewrite a lot of it?
If not, what are some good reputable companies that do this.
Thanks in advance.
No, there is no quick way to migrate the application. Start with a requirements review, you may find that a robust CMS or cart will provide a lot of the features you need.
Related
In terms of expansion of my knowledge, I would like to try to make an SaaS application. I dont really care of app funcionality, but I would like to learn about technology behind it. So my question is, would be someone so kind and show me where to start? some good reading, tutorials, articles or books? I am most interested in:
every user, after registration, has its own playground at username.domain.com
app should use some kind of master script which will generate content for all users
what are pitfalls of such app?
what technology backend is needed?
I am open to Ruby on Rails solution. Sorry for my bad english, hope I make it clear. Thanks
You want to build a multi-tenant solution.
Some things to consider:
Each one of your users should have an isolated database. This means you need to choose a database driver that can switch the database at run time. The id of database could be based on the user-part of the domain.
You can use Devise+cancan for registration. But you will need to redefine some Devise controllers so that they take in consideration the database.
You may consider reading Service-Oriented Design with Ruby and Rails by Paul Dix. It has a lot of interesting ideas that you can use to build an efficient service oriented app, which undoubtedly is the kind architecture that you should strive to create.
I suggest that you use Heroku to host your application. MongoHQ would be very nice for the databases - and they have an api to make CRUD on databases programatically.
And finally, remember to fully test your application. Capybara plus Steak for integration testing, RSpec for models and controllers and Jasmine for Javascript.
Also, don't implement your own payment system. There are a lot of providers that you can use like http://recurly.com/.
You may want to take a look at the Rails kit at http://railskits.com/saas/
If you prefer to build it your self, take a look at http://www.chargify.com to handle your payments.
Check the page SaaS application development using PHP in Zend Framework it provide details about building a SaaS appliation in PHP Language.
Have a look at this tutorial. It's exactly what you are asking for:
http://anantgarg.com/2013/06/10/build-a-php-saas-app-from-scratch/
This is for PHP, but you can easily adapt it to RoR.
I'm building this web site for my friend's startup. The site when its complete should be able to handle 10,000 users at a time and should have great security.
I've been developing the site individually till now and everything seems to be pretty feasible, but some of my developer friends suggest that i move to a framework.
What are the pros and cons of moving to a framework?
Also i have developed a pretty big part of the website till now, so can i just move it into a framework environment. I've never worked on any kind of framework before.
Cons of going to a framework:
a learning curve
you may have to approach things differently then you would normally
performance overhead (probably slight)
Pros (of a GOOD framework):
much of the mundane coding is already done
helps you write clear, compartmentalized code
libraries included to help you with security, database communication, etc
easier for other developers to jump into the project
bug fixes from the framework's community
The number one benefit of moving to a framework is that the people who developed the framework already solved (most of) the problems you would face if you would do everything yourself. I think this argument should be enough to answer your question.
If you need help in choosing a framework, stackoverflow has lots of already answered questions in this area. You should take a look at some of the opinions already posted and decide what you need.
Why do you want to invent the wheel over and over again? Building your own system is, in my opinion, only usefull if you want to learn how to build such a system and get familiair with the basics of a CMS. The problem with it is that you have to do all the debugging yourself which will take ages. With a framework, other people already did that work for you, so you can make progress much faster.
There is no thing like a best framework. I have worked with Zend Framework and Kohana 3. Both are really nice frameworks but if it was up to me I would take Kohana. Remember there are many more frameworks and this is not a complete comparison. Just give it a google and choose the one you feel most comfortable with.
Good luck!
I would suggest the Zend Framework as per your requirement.Just look at site view futures,but it some what difficult to learn in start.But if you want customization then Core php is the best.For security you have to know the things some better way like sql injection & design the architecture according to it.For faster development you can also move to ROR.
Have Dream Day
Further to my comments, I find working with other peoples frameworks rather a procrustean endeavour. Because I wrote it, I know my framework inside out and can rattle code off very quickly whereas when I am coding for a popular framework like CodeIgniter, Zend or Symfony it takes me that little bit longer to remember how I'm supposed to do something in the way they want me to.
Of course, a lot of the hurdles, common tasks and security issues will have been encountered and solved for you if you use a framework. However, if you've already written a large part of the website code then refactoring it to leverage a framework could be quite a substantial undertaking unless you've been quite clever with your initial architecture and have things loosely coupled.
I am coming up with a web application which will be primarily based on PHP. I would like to know some of the best practices and technologies that I can make use of to come out with the app as fast as possible. My team will be working remotely, so I want to know the best ways of collaborating through web resources too. I'm expecting in here, the options or a framework of technologies that can get me a great app in a shorter time.
I've given a small example out here. Please extend my plan and give me suggestions...
Server Side Scripting - PHP (CakePHP for rapid development)
Client Side Scripting - JS (JQuery - A JS framework for rapid development and compatibility)
Authentication - OpenId
Database - MySQL (Stable and OpenSource)
I want more to be added to this list so that I code less and reuse more. Please help me out.
Reusability is the key factor. How do I leverage already available classes, frameworks, etc in an efficient way? I want to know my options.
Try to find a framework that suit your needs. If you want reusability, make sure you learn/understand the concept of the MVC pattern (OOP). I personally work with Zend-Framework which has a very big community.
(However, a good practice is building your own framework. Look at other frameworks and learn about the pro's and cons.)
Every project starts with an UML design: http://en.wikipedia.org/wiki/Unified_Modeling_Language
Don't try to invent the wheel again, for example: learn/play with the 960 css grid http://960.gs, jQuery and different database-types.
Documentate everything!
Test everything http://simpletest.org
use subversion for easy access of previous versions of your project http://subversion.net
Good luck!!
I'm trying to create an online dictionary (some rare languages) and need you suggestions.
My php, mysql and javascript knowledge though is far from excellent, but is enough to understand the code and make some changes to it. I've done some projects with Drupal before and now thinking about trying a php framework for this project, because I belive that php framework could be more flexible in this case. I don't have any experience with any frameworks. The project isn't commercial, more like a hobby.
So, the question is - Is it worth trying a php framework or should I stick with Drupal? Maybe, some other options?
Thank you.
Some people thinks that writing your own engine instead of using a CMS is not worth.
But if you use a framework, such as Zend Framework, Symfony, CakePHP, CodeIgniter, etc... you will be able to have a robust basic engine which could be extended to your needs, and get improved with time.
With time, you write your own library which you know, and, the most important, which fits to your specific needs.
So, try to find the tool before to write it, but write it you was not able to find it, or it was not adapted to your needs, or adapting it will you cost you extra times.
Think of the following things :
Is the template engine will let me able to design anything I want
Is the software enough modular to let me able to develop plugins or new modules
Is it worth to learn how to use it ?
Is it activly developed, and documentation is available ?
Will it cost me extra time to develop with it instead of writing it from the scratch and create my own library ?
And probably others things i forgot.
Since you mention PHP, why not consider Mediawiki (the engine behind Wikipedia) ?
There's always Wiktionary, if it's an open project that you're working on.
I'm in the process of starting a new web site that is something like stackoverflow but a little bit more different along with making the members profiles highly more customizable I was thinking of building it from scratch using PHP, but was thinking of using CakePHP, but then I thought WordPress sounded better but I remember working with wordpress and it was a little bit slow at times when you tried to browse the web site.
So what I guess I'm trying to ask is that should I design the site from scratch? And I heard techcrunch.com and 9rules.com are completely done in WordPress, is this true?
Wordpress is a blogging engine, which is a specialised kind of CMS. It's not suitable for building something like Stack Overflow on.
CakePHP on the other hand is a framework - something to help you build a website so you're not starting from scratch. This would be a good bet.
For other PHP frameworks check these questions:
What PHP framework would you choose for a new application and why?
PHP Framework Decision - Analysis paralysis!
Be sure to check other frameworks too. CakePHP is a framework which makes a lot of choices for you. If your application fits in it probably works like a charm, but otherwise a framework can be a huge pain. Zend Framework has a lot more flexibility, but it also takes a lot more time to bootstrap your project. In the end it is all about personal preferences, so I would recommend you to just try some frameworks and find out how it feels for you.
Some frameworks:
Zend Framework
Symfony
CodeIgniter or it's successor Kohana
Wordpress isn't slow, if get decent web hosting and know how to tune a webserver. But no, it won't really suffice for this. FastCGI on a threaded webserver with enough memory to cover peak traffic is the way to go.
Drupal (and maybe Plone) could probably do what you want without coding, but you'd still have to learn a lot, so you might not gain much over just coding the thing.
Using wordpress or joomla or any other framework will require enormous emounts of custimization of the framework to meet your ends. If you are not very comfortable with using those frameworks and how they are built, you are probably better off writing by hand, and maybe develop your own framework that suits your own needs.
Hand code the novel aspects of your site first without concern for the final product. You goal should be to find what you really need and how you are going to need them. For instance, if you need a blog for the staff, then you can install WordPress and move on to the next problem (your branding can be duplicated to a WordPress theme).
If existing software solves the problem, then version 1.0 should be a Frankenstein solution (which sucks aesthetically). The idea is to map out the incongruities between the various problems you are trying to solve so that when you do rewrite everything you do not produce the same problems.
Ideally, you will spend most of your time adding value to what you need that is novel about the site.