Kohana and Zencart - php

I have a kohana script which the customer wants to use in conjunction with a number of zen-cart modules. One idea I had was to run that script and zen-cart side by side with this class.
http://www.phpclasses.org/package/4912-PHP-Manage-users-of-Zencart-installation.html
Has anyone used this before? Is this a viable option? If not my options are port zen-cart modules to kohna (ugh) or rewrite the kohana script in zen-cart (double ugh).

I would think a much easier path would be to create a model for the Zencart customer object using the in-built ORM module in Kohana. Although all this depends on what your current Kohana script does. Can you post the code for your Kohana script, or at least provide an overview of it's functionality?
Porting a Zencart module to Kohana would be a better option because:
Kohana is a much better framework than the mess that is Zencart.
You can release that ported code to the community to allow other developers to take advantage of it (and improve your code).

Related

How would I use the Joomla Framework vs. creating Joomla extensions?

I have experience with Joomla and have modified and wrote some simple Joomla extensions. I don't have experience using one of the popular PHP frameworks (such as CakePHP), but I was thinking about using the Joomla framework because I'm familiar with Joomla. How would I use the Joomla framework for a software project instead of using regular Joomla and writing the extensions needed for it to extend it's capabilities? Thanks!
The basic idea is that you:
Get a copy of either the whole framework or just the packages you need+dependencies (from github or composer) or use the older copy that is shipped with the CMS,
Bootstrap your application (JApplicationWeb or JApplicationCli).
Write your code using the MVC structure provided.
The big difference with writing a totally independent application is that you are doing just that, you need to build everything in the application whereas in the CMS there are already a lot of things in place. (The good part of that is that you can make new code with no legacy concerns.) For example, if you look at the JIssues project you'll see that they had to think about things like authentication. So as you would expect writing a simple application is simple, writing a complex one is complex.
You can see many examples of framework applications around, ranging from the ones found in the CLI folder of your CMS installation to JIssues, and of course the three web applications in the CMS are all examples of applications on the framework.
The Joomla Framework is intended (among other things) to be the platform upon which you can build a web-application. The framework is like the frame of one of those motorcycles they build on "American Choppers." It provides the backdrop so that you can hit the ground thinking about your app without worrying about User Authentication, database connection, and a thousand other things like those that get in the way of bringing your app to its potential audience.
If you're trying to extend Joomla, the current edition is what you should be using.

What CMS can be used with Phalcon framework?

I've been using Wordpress for the past 4 years for developing small and medium websites. Now I have an enterprise project and I'm considering using Phalcon PHP framework.
My enterprise project will be handling a large amount of users and will be publishing articles with images. This is why I still want to use some sort of CMS.
I think framework like Phalcon is great for service and business layers, but it lacks the GUI / services found in various CMS's like Wordpress. I know Phalcon Eye is in development, but it's in very early development stage (I think).
Can Phalcon MVC be used alongside any CMS? If yes, wouldn't the speed of Phalcon bee compromised by much slower CMS? (And what CMS is recommended?)
Update
The first version of my enterprise project is currently using WP for handling user registration, page / template handling, articles etc. But that's just a small part of the solution. All other code is custom and I've realized that should use a solid framework like Phalcon, Laravel, Sympfony etc.
Update 2
What if I use a framework like Phalcon for my custom code, present data and form handling. Then I build a Wordpress service that will retrieve articles from WP DB's. That way I would not need to use wordpress for presentation, but I can use WP for handling articles, images and maybe even users. Bad idea?
You can use Yona CMS (built with Phalcon), whose code is hosted on GitHub, with modular structure and great speed of Phalcon Framework.
There are few large projects working on this CMS.
Using an existing CMS for the admin and writing a phalcon frontend for it is a very intriguing idea I have pondered on and off over the years. (I haven't done it yet because I have a custom CMS to maintain, which I am not sure how to replace with WP or joomla etc)
I think it would be possible to have a site that is much faster than a WP site by using phalcon, but I think the tradeoff is no WP plugins will work, and the more PHP you use to make them work, the more you erode the benefit of phalcon and you might have well just used WordPress.
I have never used Phalcon 2.0 with Zephir, so can't comment on that.
----- extra comment stuff----
I see a comment about updating phalcon, which I thought I would address you can update phalcon with 3 or 4 commands (or a single shell script), and it only takes affect when you restart your webserver. Apache can do a graceful restart which shouldn't affect any of your users.
Whether phalcon is harder to update than a framework written in PHP file comes down to your update method. Updating phalcon with git is far quicker, easier and safer than FTPing individual files for example. Naturally using git for both I don't see much of a difference, just as long as the webserver is clever enough to not open the php file just as you are copying it of course...
re: speed - phalcon is very fast (upto 10x faster than zend framework v1 IMO, YMMV), it might not be as fast as node depending on what you are doing, but if your PHP is far better than your JS and your Server Admin has never used node - like me then the difference in speed it didn't look like it was worth the extra effort.
I think as per your requirement you should go for a CMS, Phalcon does not provide you the functionalists of a CMS, it has it's own advantages. If you are using wordpress and not satisfied with its performance then there are many other popular CMS solutions available in PHP like Joomla or Drupal, you can look into that also, and choose the best that fits in your requirements.
Only a CMS based on phalcon, like phalconeye, may get the benefits of phalcon's speed.
If you want speed, avoid Drupal, that not where it is the better.

Zend vs drupal (comparison)

We have a project to build a web application that has many features like: google maps integration, item review and rating (something like eBay rating), chatting among users, content search based on content calculated value, integration with Facebook (for login, liking the content, fetch user's friends...etc),batch and real-time notification through SMS and email and many others.
We have two candidates for this zend and drupal, I tried to search a detailed
comparison between them without luck; only found high level stuffs.
Our criteria is to use a product which will not require lots of custom development and satisfies most of out needs out of the box, and it should be reliable and easy to maintain and extend in the future.
I would really appreciate if someone can shed some light on zend vs drupal comparison and point me to any useful recent analysis already done in this. 
What are the real strengths of zend ?
Thanks in advance and best regards
 
Drupal is easier to have a project up and running with, it is a fully working web application out of the box. The flexibility of Drupal is pretty good, but be aware that using such a "pre-built application" type of framework tends to make the hard things easy to do, and the easy things hard to do.
Zend Framework, on the other hand offers much more flexibility, but at the cost of having to write things up from scratch yourself.
Actually, you are to choose from two different solutions. They are both used for building sites, but on a different level.
Base on the following:
Our criteria is to use a product which
will not require lots of custom
development and satisfies most of out
needs out of the box, and it should be
reliable and easy to maintain and
extend in the future.
I think you should choose Drupal. This is why:
Zend Framework is PHP framework, which enables you to build applications almost from scratch - you need to put some effort to reach the phase when you are able to actually use the application,
Drupal is Content Management Framework, that helps you build CMS system on the basis of your modules - only thing you need to start using base features is to install Drupal,
both Zend Framework and Drupal are extensible, but Zend Framework is much more extensible. Drupal has some architecture that should be followed and you can not do much about it (unless you really have time and resources to change it significantly and then be your own support, updating the core), but since you need "just extensibility" (not some major one), Drupal still meets your needs,
there are plenty of modules allowing you to add needed features to your application on both Zend Framework and Drupal, but in Drupal it is just as simple as copying the files and configuring it through the interface - there is usually nothing that has to be performed by developers,
You have to be aware also, that because of some architectural restrictions you should first analyze, whether Drupal is really suitable for your solutions. If you think the traffic will be heavy and you need different base concepts (user management, content management?), you probably should think about choosing more resource-consuming solution (which is Zend Framework).
Zend is an application framework while Drupal is more of a content management system (with some framework characteristics). That makes it difficult to compare them beyond those definitions.
Our criteria is to use a product which
will not require lots of custom
development and satisfies most of out
needs out of the box, and it should be
reliable and easy to maintain and
extend in the future.
There's no magic bullet for that but most of your criteria (pre-built modules) puts you firmly in the Drupal camp. It employ modules that you can plugin and config.
Drupal offers both the functionality of a framework (through modules and its API), and Drupal offers ready-made functionality. The trick is knowing Drupal very well.
Pre-made functionality in Drupal can be overridden through hooks, or you can find workarounds that DO NOT require modifying other modules, but sometimes this requires a lot of experience with the inner-workings of Drupal, for maximum control.
One major hurdle is deciding when to write in-house modules, or turn on modules provided in core or contrib. The problem (for me) is resisting the siren's call to use every module that Drupal provides either in core or in contrib.
Another technique is to turn on a module, and use the functions and data that the module provides, and create your own functionality on top of (or replacing) the functionality provided by the core or contrib modules.
With Zend, well they offer a very good set of classes but every page including admin pages, and features like caching, and routing will need to be built from scratch. In some ways this can be a good thing if it can get you away from the siren's call of wanting to use ready-made Drupal modules.
On the other hand, you own everything you have to make from scratch. With a community like Drupal, you can be part of a community that shares in development efforts.

Symfony vs other frameworks for an eCommerce site

Currently, I am looking to switch from a home grown eCommerce website to a custom site using a framework. I need something that can upscale (handle hundreds to thousands of transactions), is easily maintained, and simple to customize.
I was recommended the symfony framework by an outside source, but I have not previously heard of it. My understanding is that using something like symfony would still require integrating magento (or its ilk) for commerce on the back end.
Is there a better solution? Is there another platform that would fulfill all of my needs?
It's hard to say what platforms would suit your needs without knowing what they are :) Do you have specific requirements that are unusual in the ecommerce world? Having said that, a decent ecommerce framework will allow you to adapt the core functionality to suit your needs in a robust manner.
As #usoban suggests, Magento doesn't require Symfony, but it is built using the Zend Framework. So if you're familiar with the Zend patterns, then you will adapt to Magento much quicker.
Magento has a broad range of features "out of the box" and is certainly capable of scaling to large volumes of transactions and visitors.
It does require serious hardware and resource optimization in that high-end configuration, but there is a body of knowledge on how to achieve that both on the Magento site and elsewhere on the web. The Enterprise Edition is also designed for performance (includes Full Page Caching) along with features/functionality that are important for administration of serious ecommerce (content merging and staging, granular permissions, etc).
You will hear a lot of complaints about Magento's learning curve, and they are mostly justified, particularly if you are coming from a traditional PHP coder background. However, if you take the time to work through the tutorials, and recognize that the complexity is due to the power and flexibility of the system, you are likely to find it worthwhile. Also, us StackOverflow peeps reckon that you'll get much better support here than on the Magento forums :) There tends to be some questionable advice there, at least here you can see what the peers think of the answers :)
Hope all this helps!
JD
There are bundles now was developped for this purpose. Some of them can give you a lot of functions like Cart management, products by categoris,...
This is a bundle that can help you sylius
Also, you can base your developpement on vespolina which is in production now.
Drupal 8, now uses some componenets of SF2, and in the future it will be developped entirely on the top of symfony. So you can start using Drupal 8 but it's in developpement stage also.
Using symfony2 will give you the possibility to use also ezPublish 5 and PHPBB4.
As you can see, most of PHP CMS and business projects are moving to SF2. And the reason is very simple, SF2 has implemented the JSR Specifications but not in JAVA language, in PHP5.3
I advice you to try it first for a small project first to learn the best practices implemented by sf2, specially the IoC (Inversion of Control) also called Dependency Injection.
I have worked with symfony in several projects (one of them is a custom e-commerce site built from scratch), and I'm very happy with this framework.
If you plan to use Magento as a backend and symfony for the frontend, I'd suggest you to use Drupal Commerce http://drupal.org/project/ecommerce because Magento is a heavy piece of software. You can even forget about symfony and extend drupal to fulfill your needs.
An alternative to Symfony could be Zend Framework http://framework.zend.com
ZenMagick is an on-going project that uses a lot of Symfony2 compoenents. It is currently at version 0.9.11. The homepage describes it as
Originally based on Zen Cart, it has evolved into a flexible and robust system of its own, that allows you to get the shopping cart you want.

What is the best way to create a "fully" modular ZF-based application?

For the past time I have been working on a Zend Framework based webshop application that we are building from scratch. The application has been successfully been set up for several clients, but we are stumbling upon more and more problems regarding extensibility and modularity of the application.
A lot of clients require a lot of different approaches on some matters, often requiring customizing default modules or extending them. I have been looking on the web for Zend Framework based code that could guide me to this and so far Magento has been the only example I have come up with. Although Magento seems to do a very good job offering extensibility and modularity, the code is far too complex and extensive for my current needs (or so it seems).
In an ideal situation, it would work as follows:
Each client gets the "base" application installed
Modules, controllers, models should be easily overridden or extended
New modules should be easily created
Are there any other Zend Framework based applications or other pointers that could guide me in the right direction?
Thanks in advance.
I think version 1.8 of the Zend Framework is going to address a lot of the issues with building modular applications. Especially with the new (Zend_Application) it should allow for auto loading of module resources, which isn't easy to do at this point.
I don't know much about it, but this may be something to look into. 1.8 should be out by the end of this month.
Zend Framework is a... framework. What you're looking for is a full blown system. That's your job as a developer is to build a system on top of a framework (whether Zend or your own).
People usually tell you not to reinvent the wheel, but in this case you need to develop your own system for your company to easily be able to develop and deploy for new clients.
Like already stated, it is a very complex answer you are looking for. You will not get that answer.

Categories