I've been asked by a client to make an online tracking system for work we do for them (we will be typesetting a high volume of books for this client). Basically, it would be a database showing the books we are currently working on, with information on what stage of the project we are at, and estimated completion dates. The only people with access to this system would be us and employees of the client company.
I've worked in MySQL and PHP before; should I just go with what I know? This answer to a similar question suggests using Google Apps. I don't have any experience with Python, but happy to learn...
You're the only one using this therefore I see no reason to use Google Apps. I'm usually weary of people suggesting Google Apps, Amazon's s3, Microsoft Azure, etc. Also, you're going to be using a radically different data store. Unless you want an excuse to learn to do Google Apps and Python, I'd say go with MySQL+PHP and be done with it! In short, there aren't really any technical reasons for you to go with Google Apps here.
Sticking with what you know is always a good solution when dealing with delivering products to customers. No customer likes to be your guinea pig while you learn a new technology, although that's often how it's done. If you are comfortable with MySQL and PHP then stick with it if it satisfies your requirements, if it seems not to then look for libraries, frameworks and components written in PHP that might help you reach that goal. If you still have difficulties (unlikely given the scope of the project given) then ask questions here :) & search the web for solutions and patterns.
If all that fails and you can clearly solve your problem with another technology, then look at moving but make sure your customer is aware of how that's going to affect you timeframes.
When you've implemented this project and have some spare time, if there's a new direction you'd like to explore then use this project as your base and set to work without the stress of a deadline.
That's my 2p worth... good luck!
When developing a CRUD application such as this, you may be required to reinvent the wheel a little if starting from scratch. Many parts of your project are not unique to the project. E.g authentication, database access, form manipulation etc.
If getting things done is important to you it may be important to give your project a kick start and stop you wasting too much time.
Use a coding framework
Frameworks often have a lot of functionality ready for use straight out of the box.
Options may include Django, Ruby on Rails, Joomla, CakePHP, CodeIgniter.
Hack a tried and tested application
Open source projects are often quite easy to mould to your needs. Drupal and Joomla are CMS products which can be used in a wide variety of ways. If your book-tracking drupal module is any good, maybe you could go on to offer it as an open source plugin?
Use a currently available app in a new way
Your app seems to be tracking the status of items added to a database. How about using software designed for tracking other types of items. E.g. bug tracking software, project management to-do list software or customer relationship management software?
Well, as everyone has already said, if you already know PHP, that's got to be awfully tempting.
But it sounds simple enough that something like Django might save you a lot of time: its built-in admin interface could be used for the "update" side of the job, so all you'd need to template up is the "read" side, which is pretty easy.
I suggest you too look at Viravis.
Related
Here's the thing. I love Ruby and I've been using it for the past couple of years. I love everything about the language and the community.
But I have this soon-to-be-large WordPress site, where I have to implement a lot of additional functinality. The problem is, I really hate customizing WordPress beyond simple theme design.
Examples of things I need to do:
add some additional information to profiles, like karma/points/reputation system
offer users to create their own page after they're allowed to do it
pulling data from some external API and displaying it on the user's profile
I got really used to the whole agile BDD workflow, where I go from Cucumber features to RSpec to implementing the stuff, and the whole WordPress architecture looks to me like ok I'm just gonna have to pray this works.
I'm not sure if it's even wise to try to write some part of the app in Ruby and try to make it work together with WordPress, or if I should just take WordPress as the only thing I've got and make the most of it's strenghts and weaknesses.
The main issue for me is that everything I'm going to write in PHP will take about 5 times as long than if I do it in Ruby, and it will probably also be more secure and robust, since I don't have as much experience with complex PHP stuff. I mean I've done a lot of PHP in the past, but I always felt like the whole thing is going to fall apart at one point.
I know there is probably no definite answer on how to approach this, but any suggestions are welcome.
We've integrated a Rails app into a TYPO3 installation. It worked out pretty well. The key point is to use Rails' support for adapting models to tables of a legacy app. An important point is to handle authentication which we handle by passing the TYPO3 session key to the Rails app in a hidden way (using PHP as the web-client and passing appropriate headers) and looking it up in the session table (respecting the session timeouts). The Rails app itself is mapped into a sub directory using passenger. Performance is very good, it's even amazing compared to our previous implementation trying to use Extbase.
So, in conclusion: If you do it right and the interfaces between the two apps are well planned such an approach can offer great benefits and the best of two worlds. If not done right or you don't understand some implications of Wordpress (like security) you will create a big mess prone to security breaches.
BTW: We reached feature parity with the Extbase (MVC framework in TYPO3) solution after 4 days of using Rails. The Extbase solution took 6 weeeks and caused a lot of headache and trouble. So your time factor may be even better than 5:1.
Why not learn how to to Behavior Driven Development in PHP for WordPress? In fact, this is one of the great opportunities for developers in 2017. We now how full blown BDD frameworks in WP-Codeception, so that you can even automate Gherkin feature files, just like in Cucumber. Check out WordPress-BDD.com for some usefull info.
Okay, so we are now developing a new Social Networking site where users will be able to add content, meet (and add new friends) new people, etc. However, we will also have a rating system like Stackoverflow has (The concept of badges). But there are a lot more features than just these, that we require (For example, retrieving content via Ajax, like on Facebook's more button at the bottom of your NewsFeed) I was thinking of making something from ground up, using CakePHP. But I am also confused if I should modify an existing open source Social Networking engine,like Elgg, instead. Will I be reinventing the wheel if I were to work on CakePHP? Development time is not a factor for me. Also could you contrast between the disadvantages (is security one of them?) between the options that I might possibly have (CakePHP vs Elgg vs Drupal vs anything else). I am more open to anything at this point too, Any suggestion would be much appreciated.
P.S - I know Drupal and Elgg are not frameworks, but to me, they look like viable options as well.
Thank you
The options are as vast as your potential needs for a reason: there isn't a single answer and the solution fitting my needs won't fit yours. I don't have much experience with fully featured engines like Elgg, but as I already know Drupal I know I'll seriously consider Drupal Commons. Drupal's learning curve is steep but it worths it. Drupal Commons is not a closed package, it builds and Drupal and its modularity. So you won't end up looking for scarce expertise with only a few good services providers available.
Being a Drupal dev myself, I'd say you'd have to consider Ruby on Rails. After all, Twitter was conceived with it as far as I know. Ruby on Rails is designed to get almost any idea fast to market. Drupal is a good content management system. Do yourself a favor and give RoR due consideration.
I try to make a social network engine use meteor, fspace , hope useful. :)
So, every so often you get sites like http://www.twitmaps.com - sites created quickly and pushed online for a random purpose.
Often either you have plenty of spare time, or you just don't have the opportunity to get your own ideas online. For example in this one, the snow images are very vague and could do with more accuracy.
What tools / languages do people use to make a site as quickly and efficiently as possible? Not one with a shop or anything like that - just 1-5 simple php pages, some API linkins to other sites, and a mysql backend. Wordpress is great for blogs, but what about general purpose websites?
I've written sites in ASP, php and am happy playing around with databases and the like - I just want a way to quickly shove something online :)
You have a few choices.
Established blog/CMS software like Wordpress/Joomla/Drupal. You can do almost everything with plugins.
If you need something more flexible use one of frameworks like ROR, Django, CodeIgniter, Zend etc
Use code generator tool like PHPRunner.
Really depends on what you familiar with.
You will find frameworks like drupal and Joomla of great service for this.
http://cakephp.org/
Best web framework I have ever used
CakePHP is good for a PHP-based framework. Since you have PHP experience, this is probably a good place to start. It's designed for rapid website development using a database for storing information.
If you're willing to experiment with new things, give Ruby on Rails a go. CakePHP was initially modelled after Rails, and it's even easier to use when creating simple websites.
For smaller sites that don't really require a database, I would wholeheartedly recommend Sinatra. It is Ruby-based, just like Rails. With Passenger (also known as mod_rails), deploying Rails or Sinatra websites become as easy as uploading files with FTP.
Since you are asking for the quickest way, I'll have to say absolutely, definitely Wordpress or Dokuwiki. They both come with a very quick installer. Wordpress is richer in Plugins, has more good looking templates and requires even less time to get familiar with than Dokuwiki. Dokuwiki doesn't need a database, Wordpress does.
Whenever I need to set up something really quick, without touching a line of code, I go for one of these.
We have been going back and forth a lot around our office lately about abandoning a proprietary framework that was developed here a couple of years ago and move to something that is larger and community supported.
Our current solution was built to include only the things we need and is very flexible, by flexible i mean that it is loose and the developers that have built sites with it over the years have take liberty in that, so a lot of sites we manage and have built and not to any standard at all. Here at the office I use the framework somewhat but prefer to use other tools. Over the years I have used a lot of PHP frameworks ranging from Code Igniter to CakePHP and have been a big fan of Zend Framework for all my personal projects so I am heavily biased and that is why i am asking here for advice from people who may be able to give me a more objective opinion. In the office a lot of work has been done on our framework so I can understand why some people might be hesitant to abandon it but the way i see it is this:
We don't currently spend a lot of time keeping our framework current and checking it over and over for bugs, we fix them as we find them. Which we should be doing
Any work done to improve our framework is directly put into our overhead column
We have a application built on top of our framework that is subscription based and closed source that we sell and I feel could be better if built to a better standard using a popular, community driven, framework that would require or encourage these things.
I searched and found this thread, Why do I need to use a popular framework?, that was similar to what I am asking but not quite. What i am asking for are opinions on as to why you would do one thing or the other, i don't really want to start a conversation about which framework is better, that will be the next step for us if we chose to switch.
Here are some of the reasons i see switching to a supported, open source framework as helping us in the long run:
As PHP puts out new versions the core of the framework will be updated to take advantage of those things without us having to do the work.
Security concerns with the libraries will be found by the community and patched without our involvement other than updating our code base with the current version.
Lots of information on the internet and exisitng code that can be used as reference
Ability to hire outside programmers that know the framework already, instead of hiring people and expecting them to have to learn how to use our proprietary one.
Ability to give back to the community through patches, plugins, helpers, and support.
Here are the negatives that I have come up with:
We will have to port all the existing code we have in our custom application to the new system
Our employees will have to be allowed a certain amount of time to learn a new framework and it's ins and outs
Our current framework is very flexible and loose which allows us to build things how ever we want and this keep our developers from having to follow and obey and conventions, which some developers seem to hate. I personally like conventions
Again it is probably obvious that I am biased and this is the reason I am asking here, I am open minded to what anyone might have to say.
Your question is really devilishly biased, because all pro's are long-term and all con's short-term development pains. :) But if the situation is even half as much as you describe, switching is the right thing and will save a lot of money in the long run.
My company is in the same sort of situation. We have a custom developed framework in Perl that never seems to get quite as much attention paid to developing new features and fixing bugs as the open source frameworks do. I and most other developers would love to switch to something open source for the benefits you mention, but nobody has the budget to spend the time porting code over. Our current plan is to use an open source framework if we have any small, new projects come up, and if that's successful consider moving older apps over.
I've mostly worked with Perl and Ruby, but a trend I'm seeing more of these days is frameworks allowing you to mix and match framework core components. For example, we're considering integrating parts of our custom framework into Catalyst. That way we can still use some of our custom developed code components (our own DBI class and some Mason templates) and porting our applications won't be as difficult. Ruby on Rails is also moving in the direction of being more modular.
Perhaps there's a PHP framework that might allow you to use some of your code, or at least make it easier to shoehorn some of your code into the framework instead of starting from scratch. Googling I see most of the PHP frameworks claim to be modular, but some appear to just allow you to develop add-ons, not swap out core components.
Sounds like you're doing some good analysis and I wish you luck in your search.
I think the most important points you highlighted here. The decision now, should be based, on numbers. Technically your analysis is perfect. What i would ask now is: How much it would cost for your company,to:
* keep your app to take advantage of new php improvements without break your old code (it means: architecture analysis, development and test, test, test).
* Do you have any developer/analyst focused in security development? (it means: security development life cycle, test, test, test).
* Do you have a development methodology? Normally those frameworks are kept under a good distributed development methodology.
I had the same question than you sometime ago, and my company decided to choose a framework, migrate our code, allocate 2 developers 1 day per week to work on the framework. To put our team to work with the framework development team was good, because we learned more about the framework, we helped the community (demagogy :-)) and we could add some business requirements in the framework features road map ;-)
I and my team are nearing completion of porting an existing application across to run on Zend Framework and it's gone quite well.
The old application had a lot of issues that were going to be big problems to fix and we decided to take the plunge and rebuilt it in ZF.
It has however taken a long time to port, I would estimate for our application it's taken us a good 4-5 months of dev to port everything across (we have taken the opportunity to rejigg the database and other areas of the system).
If you do go for it then be prepared to explain to your bosses why you need to spend a good chunk of time porting rather than working on income generating work. We were lucky to be able to use a new project as the impetus to carrying out all this work.
I see a couple of cons of switching over.
First, of course, there's:
We will have to port all the existing
code we have in our custom application
to the new system
Followed by:
We will have to port all the existing
code we have in our custom application
to the new system
and, last, but, not least:
We will have to port all the existing
code we have in our custom application
to the new system
You were talking about "money in the overhead column", and rewriting working tested code in to new working tested code doesn't add a whole lot of value.
If you're talking about introducing a new framework for a brand new, unrelated project, or one that uses little of the existing code base, then, sure, knock yourself out. That's a fine opportunity to switch frameworks, platforms, languages, etc.
But an existing, shipping, mature code base with existing knowledgeable folks working on it?
That's a hard pill to swallow, personally.
If you want folks to follow standards and conventions, then ... follow standards and conventions. Since you have a system that allows folks the "freedom to what they want", make "following standards and conventions" something they want to do.
It's always better to transition a system incrementally that throw the whole baby, bathwater, soap, basin and towels out the window just to go back and redo the exact same thing again.
Everyone wants to rewrite code, I want to do it. Our framework needs a "do over" here. But then we go "yea, but..." and what do we get in the end? N Months of effort to get back to where we are now. That doesn't do much in a world where time to market matters.
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 8 years ago.
Improve this question
It's hard for me to imagine a php script that is more than a few hundred lines of code. It seems that, for a non-persistent environment, web-based scripting is usually done is small chunks and used for the purpose of delivering a portion of a website to the end user. I'd like to know if people are developing any type of large, or persistent, or complex apps with php, and what is it exactly you are working on. I've only done small projects for small websites, so I don't know what can be accomplished on a larger scale. It would also be nice to know what libraries you are using, and what other technologies you are integrating with. Please enlighten me so I can start to dream of bigger things!
I would look at some of the well-known open source web apps that use PHP to get a good sense of what can be accomplished, and how PHP is used in each of them. The advantage is that since they are all open source, you can actually look at the PHP code to see how various functionality was implemented.
Some good examples to look at include:
WordPress
TextPattern
MediaWiki
PhpBB *questionable code quality
SugarCRM
Joomla
Drupal
Also look at some of the popular frameworks to see what kind of functionality they offer (this should give you a good sense of what types of things PHP is most often used for):
Zend Framework
CakePHP
CodeIgniter
Symfony
For my day-job we run everything in PHP - our front-end website, our backend for agents and employees, inventory, server control interfaces, etc. These are everything from spiffy new AJAX-enabled Zend Framework apps to legacy code that we haven't ported yet. On top of that we use things like Mantis (bug tracking built in PHP), Mediawiki, and phpMyAdmin.
The only thing that isn't PHP are vendor apps because vendors love Java. The one ASP.NET application we have was actually abandoned by the vendor during the project (not really a knock against ASP.NET, that app was just the perfect definition of a runaway project and would have failed no matter what language it was written in).
With mature frameworks like Zend Framework, CodeIgnitor, and CakePHP creating just about anything in PHP is possible.
The biggest problem developing large scale programs is definitely keeping them maintainable in the long-term. Initially, a program starts out all full of ideal methods and ideas, but keeping the integrity intact, especially, over time fails, in my opinion, more often than not.
In addition, scope creep is your enemy. You HAVE to reign that in ASAP.
As far as large scale programs go the company I work for has a few internal programs constantly under development. One example is our proprietary website engine. It's a very large code-base that includes a dozen modules (user management, survey system, blogs, user galleries, etc) that allows us to build our clients sites rapidly.
We also develop our own internal project management program for managing our clients work.
You should definitely be thinking in terms of scale in the long term. In almost every project I've worked on there's a permission/group element for users involved. You might want to start thinking about the possibilities and issues involved in that and work up to more complicated functionality.
MediaWiki is one of the largest public PHP apps, and it's got very nice code. . I know some larger ones, but they're utterly awful and you'd learn nothing by reading them.
There are lots of complex OpenSource php applications. For example, the Drupal CMS, which can be considered a platform in its own right for developing other web sites.
You can browse through the source code online: http://cvs.drupal.org/viewvc.py/drupal/drupal/
+1 for Wilco
I have a software I use for some of my clients, it's a CMS, Blog, eCommerce beast, the code base is HUGE, but everything cooperates with each other nicely.
My company works on educational software. We've recently started doing web-based content delivery, including video and audio, with the backend written entirely in PHP using MySQL. We have two primary apps, one which lives on our servers and one which is delivered to the customer. One clocks in at ~42,000 lines of code (using a physical line count) and one at ~68,000 lines.
We use PEAR extensively and a recently started project is using the Zend Framework.
We use PHP at our company. (We do online language learning: http://www.livemocha.com. You should go take a look at the site. Yes, it's sort of a shameless plug, but it's also topical. :-) )
I can't give you a precise number of users, but we put out a press release a while back celebrating hitting the 3 million mark. That's a pretty large scale as web apps go.
We build on the CakePHP framework, which is based on an MVC architecture... at least in theory. In practice, they auto-generate certain methods for the models which tend to have the result of pushing some pieces of model code (caching, deciding which DB to use) into the controllers. They also have a few localization issues in 1.2 that make me think this part of the framework hasn't really reached maturity yet. That said, I find CakePHP pretty comfortable to work with overall, and you should at least take a look at it if you're considering implementing a large-scale web app in PHP. It has some excellent documentation available as well (google for "CakePHP bakery").
Get CodeIgniter and rebuild Amazon or Ebay. If you can dream it you can build it in PHP but you might not be able to maintain it because it is so easy to created bad code that works. PHP.net is your friend. Whatever framework you use make sure your read the User Guide and let it guide you.
I can't believe nobody has mentioned the MVC pattern yet. IMO, it's one of the best things you can use to help you maintain large codebases.