What is a PHP code generator? - php

I'm thinking of using a php cms, a php framework or php code generator. A php cms is restricted somehow and with a php framework and a php code generator I have more freedom. But what exactly is the difference between a framework and a code generator or what do a framework share with a code generator? I'm also planning to use Scriptcase 5 for a project because I already have the licence and I don't want to use a cms or something similiar that can limit me.

With a code generator such as Scriptcase, you do not have to write PHP / HTML code to create a data-driven web application.
However, if you want to extend the default features of the web application generated by a code generator, this will be painfull and you must have both time and deep understanding on how PHP and the generated code works.
If you want to create a website/blog/publication web app => use an existing CMS (do not re-invent the wheel)
Otherwise:
If you don't have the time and/or you don't know how to develop a web application => use a code generator
If you want to create a complex web application => learn how to develop (if needed) and use a framework

CMS, framework and PHP code generator are three different beasts.
CMS is a software tool tailored to allow easy website editing/maintenance. Most CMS use databases though there are file-based ones as well. Popular CMS are Joomla, Drupal, CMSMS and Wordpress to some extent. You can use CMS to maintain your website however building a web application like Twitter or Facebook won't be possible. CMS is not a tool, this a web application.
Both framework and PHP code generator allow you to build web applications. With framework you still need to write the actual code. PHP code generator will generate 50-90% of code for you.
Lets use an analogy. You need to build a car. Writing code manually means building a car from scratch: building your engine, your transmission, writing the software for car computer etc. It will take many man years to build one.
Using framework is similar to buying DIY kit. You get engine, body, wheels and just need to assemble it. Depending on your skills this can take up to few months.
Using PHP code generator is similar to pronting your car on 3D printer. You choose the program, select make/model/options and click 'Print'. Some time later you have your car. You might be able to customize it to some extent. You can even buy another engine and replace the stock one.
And CMS is the car. You can paint it different colors, change wheels etc. If you need another car, you have to get another CMS.
If you read that far you deserve to know that the best PHP code generator on the market is PHPRunner.

Code generators are best to develop Database management systems. They save you lot of efforts in writing lengthy code for almost similar tasks. Some of the Code Generators do amazing work for you with just few clicks.
Also maintaining the project becomes very easy with these generator for everyday customers requirements

I recommend Scriptcase if you want a make simple projects with cruds and so on. For complex project you will need more flexibility and Scriptcase doesn't flexible. I worked with Scriptcase for 7 years and it's amazing.

Related

How do I embed sklearn code in my PHP backend code?

I am creating a website which uses PHP on its back end. Now I am adding machine learning capabilities to my website which are accessed by HTTP methods GET and POST. But since sklearn is in Python, how do I enable my PHP code to call python based sklearn code? Or is there a way I can use some library to call Python code?
One possible option for you to consider is: https://github.com/nok/sklearn-porter
I think you can achieve your goal, without calling python code directly (embedding it) from PHP code.
For example, let's suppose you have a web application, which is built using PHP, and your application contains Articles, and you want to add the feature of categorizing (tagging/classification) of those articles into some categories: News, Sport, Medical, Science, etc ...
let's say that you have built a machine learning model using sklearn (possibly naive Bayes model), which predicts the probability of each category. and you want to use this model within your application.
Now, you can export this model as an API, and make other applications use it, in our case, your web application will send the Article to this API, and get a list of predictions for each category.
For building API in python you can use: Flask-RESTful, or Django REST
While this approach has some disadvantages, I think it's much better to design your application(s) with modularity in mind, keeping each service (functionality) separate from the other, makes your system more loosely coupled.

PHP, Zend Framework, Wordpress, need to find some clarity

First off, I'm new to web development. I am fairly comfortable with HTML/CSS, and I am building my first site for a friend's business. I want to include a contact form, so I downloaded one from CodeCanyon. It is perfectly fine, but I'm in this to learn how to do this, so I scrapped the downloaded form and set out to learn some PHP. (I realize that later on, from a profitability standpoint, it may be a wiser decision to use these types of plugins rather than doing it all myself; would love opinions on this as well).
I learnt how to write a simple e-mail contact form from some tutorials online, but quickly found there's much more to it when you get into address validation, and preventing spammers from hijacking your form, etc. Should I continue to try to learn how to do the whole thing myself? If so, What is the best resource available?
I noticed people saying great things about Zend framework. Can someone explain what it is in simple terms?
Also, I haven't used Wordpress yet, but it seems the best use of this (aside from using it to create quick websites on the cheap) is as a CMS so your clients can update their content later. Does Zend framework also have some kind of CMS element to it?
I know this is kind of a complicated series of questions, but I'm trying to get some clarity. To those of you who have been at this a while, all the different products, languages, acronyms, etc. may seem like a piece of cake, but to a newbie like me, its hard to figure it all out without some kind of sounding board.
Kind of an open question but:
Zend Framework is a set of libraries that help you create php applications. They have a set of predefined classes that simplify tasks like Access Control List (User Login and such) or access Google APIs (like calendar and email). To take advantage of those libraries you need to interact with them in the programing level. (that is, you need to know how to program in PHP and how to access those classes). Here's an example:
require_once('Loader/autoloader.php');
$acl = new Zend_Acl();
$acl->add(new Zend_Acl_Resource('view'));
$acl->add(new Zend_Acl_Resource('edit'));
$acl->allow('guest', null, 'view');
$acl->allow('editor', array('view', 'edit'));
This creates a User Role named guest and editor, and gives permissions accordingly.
Wordpress is a CMS (like joomla and Drupal, for instance). You don't need any PHP knowledge to create a site with these tools and you interact with the modules in the admin level. You can actually integrate Zend Framework (or any other framework) with those CMS, but then again you need not only knowledge in PHP but also in the framework itself and in the structure of the CMS.
To summarize, PHP is powerful yet relatively easy programming language. Should you decide to learn it, you should start by doing some basic tutorials like this one to familiarize yourself with the language. The learning curve might be a little steep but it pays off. Once you feel you can do most tasks, you can try to work with a framework (ZEND or SYMFONY, for instance)
If your only objective is just to build sites easily and quickly, you should use a CMS.

Drupal (or some other CMS) or a simple MVC-based PHP framework like CakePHP?

We have a dashboard that we'd like to build for our customers. This dashboard displays various statistics about one or more of their (business) Facebook Pages. The statistics are pulled from Facebook using their FQL and Graph APIs, stored locally in a MySQL database, and queried/derived/presented to the user based on dates requested and some other variables. Additionally, users will be able to take action on various items (e.g., reply to wall posts, etc.) using their JavaScript SDK.
One of the external developers we spoke with -- currently don't have any resources within the company with time to work on this -- has proposed building the system around Drupal. Now I'm a fan of CMS systems for web pages, blogs, etc. but using something like Drupal did not come to mind here as much of the functionality seems irrelevant.
Can someone please let me know the advantages and disadvantages of using Drupal for custom development work like this? While we're looking for an elegantly designed system that our developers (as we hire them) can maintain and extend over time, I'm not so sure a CMS is the way to go.
Thanks!
I wouldn't recommend Drupal at all for something like this. You don't really need a full-blown CMS like Drupal, and it would be pushing it to say you should use a framework such as CakePHP.
Personally, I would build this as a standalone app. I see no reason to get a framework involved unless you plan on expanding the APP considerably in the future.
Drupal is often called a content management framework because it's so extensible, and certainly you could implement the dashboard in Drupal. However, I would question the developer thoroughly about their rationale for using Drupal before consenting to it.
Everything you specified sounds like custom development and has nothing to do with content management. You're manipulating data from Facebook, not a database of content produced by an editor. Your data is custom data, not simple Drupal node data (title, body, etc). I would go with a general Web application framework such as CakePHP. That way you get templates and user authentication without all the CMS overhead.
While I don't think that Drupal is really necessary in this case, I think that the final decision lies with what the strengths of the contractors you are using are.
If Drupal will allow them to finish it more quickly, and more securely (due to the fact that Drupal will provide well test user authentication, used by many), then I would say let them go with Drupal.
That said, I do agree that Drupal sounds to be more than what is necessary, and there would probably be far less cruft if you used a simple framework.

When should I use a CMS over creating a website from scratch?

Lately I've been trying to learn ASP.NET. I've gone through the tutorials on the ASP.NET website, but for the most part I'm a complete beginner. I've also been working on creating a personal website, which I've opted to use the CMS Umbraco because it is based on ASP.NET.
Now my questions is not really specific to ASP or Umbraco. It could apply to PHP and Drupal or any other website framework and CMS. I'd like to know when and why a website should be created using an existing CMS technology (Umbraco, Drupal etc..), and when a website should be created from "scratch" using a base web application framework like ASP.NET, PHP, JSP etc..
It depends heavily on the CMS's (module/theme) API, for instance, one Drupal modularity in my opinion is its greatest strength, although learning Drupal itself is not to be taken lightly either. I've seen a lot of commercial sites done in Drupal, most of them look successful, but it made me think what was the total cost of creating the modules, customizing it, etc.
Since you mention you are a newbie in this stuff, do take in account all the stuff to take care of when you are creating a website from the scracth:
Security (XSS prevention, sql injection, blah blah)
Authentication
A flexible theme system (unless you mix html with code... good luck, although there are some really nice template system available for PHP 5)
Database Layer (just use an ORM)
Learning JavaScript, then learn jQuery, MooTools, etc.
Administration panel
Adding stuff like content management
But most importantly, plan something before doing it. Starting out just because you feel like without planning what you want and how will you implement it creates uncertainty, just too many doubts...
So start with a CMS, even for a personal site. There are solutions like Joomla! Drupal, SimpleCMS, some django CMS are also out there. Learn the language of the CMS and start creating your own module as you see fit. Always read their documentation, search in forums before asking, or search here in stackoverflow. Really.. just ask here.. better than googling for a solution :P
You should use a CMS because it's simpler. There are a lot of 'boilerplate' code that you don't need to rewrite. Some CMSes might also contain useful code like user authentication built in. You won't have to roll it your own way, saving time and if you aren't a good programmer, it might also be more secure. Not only that, using a popular CMS means you'll also have a bunch of modules that you can just plug in and use. You can now focus more on the design than the programming in less time.
When should you not use a CMS? If a CMS doesn't provide anything you need or it doesn't allow you to do what you envisioned.
First of all it depends on whether you intend to build a real-world professional website for commercial purpose. If you do, I have to tell you it takes at least 2 years full time self-study to be able to write a web site like that. Web development is not as simple as it's made out to be (Some ppl say you could manage ASP.Net in 3 months-that's due to ignorance). Not only that, it is extremely logically challenging.
So if you only intend to write one professional web site, the best choice would be to pay someone to do it. You only learn ASP.Net when you intend have have a career.
CMS website would be enough for personal website, but maybe not professional enough for "tasteful" commercial websites. Its looks and functions all look the same, maybe good enough for local appliance repairs shop, but not good enough if you want to show your business have "taste", which also implies money
The most important feature of the CMS is its simplicity and the management of data.This is why my big sites like stanford, whitehouse etc have their sites on CMS.Managing the data is not an easy task as it seems.
For me at least it would be better to at least try to create something from scratch I know that they're plenty CMS out there that make things easier but, again ... for me the best way of learning is doing things your self and discover and solve real issues rather than just read about them. if its something for you own and you can afford the developing, troubleshooting testing.. blah blah... do it your self, if its something for a client and you you have a due date I would rather use a CMS or if you want something between a framework such Cake PHP or Codeigniter.

CMS or Framework?

I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about)
On discussions with friends, they suggested Django. But I have no experience with Python or Django.
So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility?
Request you to not make this a php vs python battle as I'm looking for advice here. Thanks
Edit: More information about the project:
The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important.
Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
Choosing a framework for a project you already know what will be the purpose will only slow your development down. If your project's main goal is to be an online store, then pick your choice among the many projects already implemented for you with payment gateways, shipping options, product management, etc. A framework may offer all that too, but will not be ready-to-use out of the box and you will have to bind everything together yourself. My personal opinion is that frameworks are good candidate when you need an highly customized web application that you will write from scratch, that will not only do e-Commerce but handle other specific business models too.
General purpose CMS such as Drupal, WordPress, etc. are good if you plan to extend your online store to also offer other options (i.g. forums, blogs, multimedia/interactive contents, etc.) If you choose to pick this avenue, I would suggest you download the source code of each CMS you retain and play with it for a while and pick the one you feel the most comfortable with, and which has a good user community. Because there's nothing worst than being stuck with someone else's broken code with no one to help you out.
For e-Commerce solutions, you can find many good projects here. If I may choose one to suggest, a solution that you may consider as it looks simple, it is written in PHP and has good reviews is OpenCart
A good one I have worked with is the Instinct e-Commerce plugin for WordPress. I don't necessarily like WordPress, but that plugin is fairly good and will have you get your online store up and running in no time. The plugin also enable you to code new custom payment gateways fairly easily (just one file to code...)
CI and Django are frameworks that help you build a web application from scratch, if you are willing to do this - go ahead and try it. There should be plenty of modules available that allow you to easily extend the framework.
Drupal however is a CMS, so it comes with multiple plugins already installed and is able to manage your content. You'd still need to develop the "store" functionality - payment, listings, etc. - yourself.
If the CMS fits you perfectly now and in the future then CMS, otherwise framework. The framework will allow you total liberty for the price of time spent on development
Have you read and heard about JOOMLA i think its very poweful CMS in php and has a lot of community support as well, In java LifeRay is a good option.
I'd only use a framework if the requirements can not be engineered into an existing cart CMS.
I'd use a CMS over a shopping cart if the commerce aspect was relatively trivial
I'm surprised you're not considering an off the shelf cart. Open Cart is pretty extensible, and Trading Eye has a nice CMS component.
I would generally advise to stick with a language you know for important projects, although I like Python as a language much more than PHP, and Django is a nice framework.
Drupal is not only a framwork, but also a CMS. You can build an online store with some modules (Ubercart), so I would recommend to try that and see if the stock solution fits to your needs.
I suggest you have a look at Drupal's repository of modules -- in particular those in the e-commerce group here: http://drupal.org/project/modules?filters=tid:104&solrsort=sis_project_release_usage%20desc
There's a ton of them that could really help to speed you along on this project.
If you know PHP and have a good grasp of HTML/CSS/JS, you should do OK in Drupal too.
Choose Django if you want to learn Python/Django and use them in your future projects. Django is cool and you'll have fun learning Python. And you'll be able to make an informed decision for your next project.
However, if you have a budget/timeframe or just want to make this project out of the door without needing to learn a new framework I'd suggest choosing a tool/language you're familiar with.
The Bricksett CMS will build the website for you but you can also modify it using PHP for additional functionality. Modify its CSS for a better look and feel. The layout is also simple yet it has a design distinct from other CMS.
A new addition to open-source CMS
Yahoo has something like a specialized CMS for online stores, called Yahoo Stores. They make it very easy to set up an online store, and provide other logistical services. You may want to take a look at that. Of course, they take a small percentage from your sales.

Categories