I'm starting a small project for my programming classes and I need a tool to design an UML model of my application, which then I can implement in PHP or JSP.
I downloaded and installed Argo UML and Poseidon Community Edition, both of them seem pretty neat, but I need to choose one over the othed so if you have any experience with both, which one should be better for me? Is there any other choice I should be aware of?
Secondly I use eclipse IDE and I'm a rookie both in PHP and JSP programming so I really don't care about using one or the other, I would like to work with the one who best integrates with my UML design tool choice. Which one would you recommend me?
I would recommend you Argo UML. It has everything you need for a basic project and unlike Poseidon it's opensource. Also, Poseidon code is based on Argo, so there's not much of a difference if you want to switch from one to another if you require some functionality one has and the other doesn't for future projects.
Poseidon has a version specifically designed to build PHP projects which integrates with Eclipse, but unlike Community Edition it's not free of charge.
Also, consider usign UML integration tools from Eclipse's MDT project http://www.eclipse.org/modeling/mdt/?project=uml2
About the language, I would go for PHP (If you're using Eclipse I guess you've already heard of Eclipse for PHP) but maybe because I'm more fluent on it I see it easier to set up a WAMP/LAMP server and start coding right away, I don't think it really makes much of a difference to use PHP or JSP as long as you use each language's specific tools properly.
Related
I am aiming to write up a web service program in either a PHP framework (such as CakePHP or Yii) or writing it up in Ruby on Rail.
I have experience in Java and Perl. One of the thing I really like about Java is Eclipse - it was made for Java and is really helpful when handling objects. Although Perl has its plugin for Eclipse, it is no where as good as using Eclipse for Java.
My question is which framework would I be better off - Yii/CakePhp or Ruby On Rails. I gave Yii a try, an it took me minutes to set up php objects based on the SQL tables. I was wondering if Ruby On Rails is that easy. Although it looks like there is more support for Ruby On Rails ...
And does Eclipse integrate well with either Ruby On Rails or Yii? eg. by typing object name followed by a dot, I can see the attributes of the object in a drop down list.
Thanks!
I was Java developer and migrated to Ruby On Rails 2 years ago and I'm happy! I offer to use it for your work because:
It has a big community, as you have already seen
It has a wonderful support
It goes with new web technologies (HTML5/CSS3, Twitter bootstrap and etc.)
It is object related language as Java
It updates VERY FAST
And does Eclipse integrate well with either Ruby On Rails?
You can use Rubymine (Ideja) or Aptana (the same as Eclipe)
eg. by typing object name followed by a dot, I can see the attributes of the object in a drop down list.
Yes, but it works buggy because Ruby is not typed language
For Ruby On Rails I offer use TextMate or Vim (Gvim, MacVim)
I prefer ruby on rails first, if you want to spend time on php frameworks try cakePHP latest version, codeIgniter (easy to use) but my feelings - whatever technologies we used - some good principle comes with Ruby On Rails framework like
Test Driven Development
Behavior Driven Development
Pair programming
Don’t Repeat Yourself” (DRY) - removing the repetition code
these type of concepts and Agile Methodology if we implement in php, java or any Dynamic Programming language no need to migrate but I am agree to say depend on business logic we can choose language.
You can't go wrong with yii if it's php but I'd say rails. I was in the same situation you're in and never looked back since switching to rails.
Yii 2 will soon be out by the way but rails receives updates really fast and the support on here is incredible. I'm quite sure I would have lost patience with rails if it wasn't for the support I receive here.
I crunch PHP all day but i would go with Rails due to the environment surrounding it.
Ruby has RubyGems = awesome package / dependency management.
PHP has Pear and PECL = headaches.
Rails has Rspec and cucumber for TDD which are awesome.
PHP has PHPunit which is an admirable effort but requires tons of configuration.
Rails has a console for scaffolding, migrations etc that is far better than any PHP framework i have used.
I'm wondering if there are any abstraction frameworks for one of the PHP gui libraries. We have PHP-GTK, a PHP/Tk interface, and seemingly also PHP-QT. (Not tried any.)
I know that writing against the raw Gtk+ interface in Python is just bearable, and it therefore seems not very enticing for PHP. I assume it's the same for Qt, and Tk is pretty low-level too. So I'm looking for something that provides a nicer object structure atop any of the three. Primarily TreeViews are always a chore and php-gtk callbacks are weird in PHP, so I'd like a simplification for that. If it eases adding the GUI/View atop my business logic without much control code, that might already help.
And so since GUI apps are an area where MVC or MVP would actually make sense, I'd like to know if any library for that exists.
Still open for answers.
(There will probably be a second bounty round. It's an uncommon topic, so needs more research.)
[Not an answer. Just wanted to remove this from the question, as it's only related, not a solution.]
There is the PHP interface preprocessor. However it is very simple and low-level. It provides an output interface for Gtk, as well as ncurses, but also PDF or XHTML serialization. Which is interesting, as it's close to real MVC constructs in allowing to exchange the View for different backends without adapting the Controller even. But then it only provides the basic widgets, and not a whole lot of simplifications. Thus I only consider it related to my original question. So, a side note.
Have you tried WinBinder? Not exactly MVC related, but a very nice extension to create gui based programs in PHP.
Now there are a few options that work on newer versions of php. Some of these do not provide you with MVC out of the box, but you can use them to make GUI application in php.
There is the very easy to use php-gui. It does not require any special php extentions, you can just install it with composer like any other php library or framework you depend on. It is geared toward simple, standard user interfaces.
If you need to make something very custom and graphically advanced, and are willing to use an API that was designed to make games in C (or if you want to make a game in php), you could use OpenGL via SDL via FFI via ffi-sdl. It currently (as of 6/1/2020) requires php 7.4 or greater as it uses the recently added ffi feature of php. Even though this relies on the ffi extension, php-ffi is still easy to add to your project. It is still sort of extensionless (like php-gui) because there are no extensions tailor made just for this for it to work. Unlike some other extensions, there is not much chance ffi will not be maintained since it is a feature of php itself. Most people will just need to add ff-sdl to their project using composer, and possibly enable ffi in their php.ini.
I just learned you could also use PeachPie. It allows you to compile and run php code for/on .NET, so you would gain access to .NET GUI libraries, including MVC ones.
I really doubt that you'll find anything like that ready to use OotB. PHP GUI programming has totally failed few years ago.
What you can do however, is use some kind of bridge to interface decent MVC from another language. Which PHP you have following choices:
PHP/Java bridge http://php-java-bridge.sourceforge.net/pjb/
Boost.PHP (C++) https://github.com/moriyoshi/boost.php/wiki
SWIG (C, C++ via wrappers) http://www.swig.org/
http://phpketchup.isgreat.org/ PHPKetchup is a new project in planning stage. There isn't any code available for now (also seems intended commercial, not open source). It was announced as framework atop PHP-GTK. There is a conception document which explicitly lists the goal as designing a MVC framework.
However it seems like they take inspiration from CodeIgniter and mostly the common PHP framework structure. The focus seems not to lie on integrating PHP-GTK with the application logic, but mostly to provide a database interface as model and a thin Gtk interface for the View.
MVC Architecture:
We will design and implement Model-View-Controller (MVC) architecture for the PHP-GTK framework. SQLite will be used for Model. PHP-GTK functions and Glade files will be integrated in View after removal of HTML, CSS and Javascript. Controller will be modified accordingly to work with the newly created View.
So it might just be MVC in name and organization, but one of the diagrams mentions "PHP-GTK functions addition" and there are further hints of object-structured Gtk helpers.
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 have been dabbling in programming/scripting languages since I was a kid. I started off with HTML and CSS, then went on to PHP (which I got quite good at) and then to Python, Perl, and C(++). I've recently done a lot of work in PHP (along with MySQL).
After spending so much time learning these languages, I now want to do something with them. I'm looking at starting/contributing to an open source project; almost certainly a web application of some sort.
In my experience with writing (admittedly small) web applications, I've found writing "pure" PHP to be an extremely slow and tedious process.
My question is this: if I were to be writing a relatively complex/large web application from scratch, what should I write it in? Should I use pure PHP/MySQL, or use a framework like Django, Rails, or CakePHP?
Writing a complex application from scratch, I would definitly not use "bare PHP" : I would certainly use a framework : they provide :
a large number of useful classes/methods
some set of rules -- like "in which directory should controllers be saved", "how to write a view", ...
MVC -- i.e. they help with better structuration of the project
Note that this answer is valid for both personnal projects, and professionnal projects.
There are several great Frameworks in PHP, like :
Zend Framework
Symfony
CakePHP
Code Igniter
Kohana
One thing to remember : learning how to use a framework well will take some time : starting with a small project, before going for a big one, would probably be a good idea ;-)
Now, when you're asking yourself the question of "which framework should I choose", it's mostly a matter of personnal preferences... And here are a couple of questions/answers that might help a bit :
PHP Framework Decision - Analysis paralysis!
To use a PHP framework or not?
PHP - MVC framework?
Which PHP Framework is right for this project?
Best PHP framework for an experienced PHP developer?
As you're asking me which Framework I would choose ; well :
I really like Zend Framework, and often use Doctrine as ORM (it's the default ORM of Symfony, but can be used very easily with ZF)
If I had to choose another one, I would probably go with Symfony, as I've seen it used on a couple of projects at work, and know many people who work with it and like it
If you already know that language, you should most definitely use a framework (unless you're a masochist).
For me, besides that fact that they're usually bundled with all sorts of great libraries, using a framework is all about using time effectively.
Most importantly, it will save you time. You're freed from the nitty-gritty of worrying about the foundation/architecture and are able to spend your time of the features of the application itself.
Also, it will save others time; especially since you plan on being all open sourcey.
depending of your skills level, yes you can do it in pure PHP without frameworks. This also will be good, IMO, to improve your skills at debugging, logics, and others. But, on the other hand, you will restrict to other programmers to improve/maintain your code due to learning curve, in this case, the framework serves as a commom language. I recommend that if your project will be complex, or with the possiblity to other programmers join in the project, that you choose a framework which you feels comfortable and use it.
Depends on who will be working with the code, on which plattform it has to run and how complex the database should be.
If you develop for a company or community it is always easiest to use PHP because there are many others who know it so i.e. for companies it's easier to recruit someone who knows the language.
If you mostly want to develop on your own, use what you like most, i even heard of websites written in pure common lisp.
If the application can run on windows only C# is also a good solution as you can develop web applications extremely fast and the .NET library makes many tasks easy.
As database backend you can use MySQL if the structure is simple but for more complex databases i'd use postgres as the MySQL performance seems to drop fast with increasing complexity (subjective opinion).
EDIT:
As others noted, Frameworks are always a good idea. There are web frameworks for most of the current languages. For PHP CakePHP was recently recommended to me.
There are several questions about PHP frameworks, but I'm curious as to which one(s) are used in the commercial world when developing web applications with PHP. At my first web-based job, they didn't have a framework for the PHP codebase. Is this common when dealing with PHP? If not, what frameworks to companies producing a product (either a site that provides a service of some kind or a web-based product that can be purchased) using PHP tend to use?
Is this common when dealing with PHP?
In my experience, unfortunately it is. This is of course a gross generalization, but people who tend to learn PHP as their first programming language don't learn the essentials of maintainable software development and often don't really know how to write good code. I think this is a failing of the PHP community, where historically most learning resources don't emphasize good practices (probably because the authors didn't know any better!). You can of course write good code with PHP, as long as you understand underlying programming principles.
Companies will often start out with a hap-hazzard code base of PHP scripts that get re-used and gradually extended from project to project (often without source control!). The companies that know what they're doing and take it seriously will evolve this into some kind of in-house framework, or I have often found they'll move onto something without the historical crapness of PHP, like Django or Ruby on Rails.
If you're just starting out, there are several decent MVC frameworks that will form a good base for all your developers to learn and use. In no particular order:
CakePHP
CodeIgniter
Zend Framework
There are of course others as well.
That said, as always it depends on the project. Sometimes a framework either won't make sense or will be overkill, othertimes you're better off using a pre-built product (like a CMS) and building extensions to it.
Most frameworks are strongly focused on the presentation layer. Now, "corporate" is of course a rather vague term, but I assume you mean for more typical IT tasks, such as accounting, CRM etc. For these tasks, the presentation layer is a much smaller part of the entire application. Not only does this make said frameworks less important - it actually disqualifies them somewhat, since you don't want the restrictions on your model layer, that they impose.
I think it gets more and more common to use a framework. A few years back most programmers developed their own framework. But the cost to train a new employee for such a framework gets higher and higher. Therefore many companies are moving now to well known frameworks.
I guess that Zend is currently the most used Framework in the corporate environment. One reason is that it does not give you any restrictions on the model layer.
I can not predict the future but I guess that Flow3 will be used in the future too. It is the new Framework behind Typo3. And many Typo3 developers (web designers) who need to write web applications will probably use Flow3 then.
In last two three places I've worked the company had their own (private, built in-house) framework.
According to a PHP Framework Popularity at Work survey by Sitepoint in 2015 (7554 survey participants) the five most used frameworks are
Laravel (22%)
Symfony2 (14%)
Nette (9%)
CodeIgniter (8%)
Yii 2 (7%)
Furthermore survey results indicate, that
5% use a company internal framework,
3% use no framework at all,
3% use a CMS for everything,
1% use a simple MVC framework.
There seem to be continent specific framework preferences: In America and Asia, Laravel seems to be the framework of choice (except for Russia: Yii 2), whereas in Europe you'll find more Symfony2.
(Be aware that this is just referenced from one source -- see links above.)
The only enterprise-level framework I can think is Zend Framework. CakePHP, Code Igniter and others are only focused on RAD development.
Having experience with CI , yiiframework and calephp (not much, really) my opinion is that CI is not flexible as ohter 2, so I do not recommend it on larger-scale projects.
Anyone who disagree, just can try a demo project with cakephp and Yii and he will see how things are easier with them as crud,form validation etc.
Of course all have their disadvantages :)
recently i talked with a CTO of a company, offering a e-lecture solution and we talked about PHP for a while ... we both agreed, it is not the best language for rock solid solutions, but he pointed out the symfony framework, they used just before moving to java ...
also, flow3 mentioned by raffael is quite powerful ... most interesting thing to me is, it brings AOP into PHP ...
greetz
back2dos
You may want to look at www.flow3.org, it's a pretty comprehensive approach to PHP application frameworking and is rapidly approaching its first mainstream Beta release.
I'm not sure if PHP has gone into the enterprise market in the US yet but when i worked in a corporate office the language what they use is Microsoft .NET.
PHP is yet to enter the corporate world IMO. It is popular with the hacker world and maybe micro and small software/web companies.