Code Igniter Update Engine - php

I am planning to develop a pretty awesome new web app that has a one time fee including free updates of 1.X updates (X being the update).
I don't want to get people to download a new version and install it manually as it can be a real pain for some people, also it's bad if there is an important bug that needs fixing and people don't update.
The app will be built with Code Igniter so I was looking for some kind of integrated system that allowed me to send out updates for the web app?

None that I know of - basically CodeIgniter is just an MVC framework. You might consider looking into a generic update engine for web sites.

Related

Zend Framework 2 Application inside Zend Framework 1 Application and Session Sharing

Before explaining my situation, here is a small briefing of the system I am running and my overall experience with web programming:
Development Environment: Ubuntu Server 4.14 64-bit, Apache 2, PHP and MYSQL database.
Experience: I do not have much experience with PHP, the main language I am using for my current project (it has been almost three years since I last worked with web programming; these last few years my focus was mainly on the development of desktop apps).
I am developing a new website for a company and almost all of the application code is ready. This application was developed in Zend Framework 2 (PHP) + Doctrine 2. Only a few aspects are missing, which are:
1 - The client currently has a website that works as an educational social network focused on providing a platform for students and teachers to interact and share knowledge and ideas. My work is related to the development of a new interface which we defined as a 'relational-modular interface' consisting in a new way of displaying information to the users of this platform. The website that the client already has was developed in Zend Framework 1, and we need the new application to coexist with the old application in the same domain. So far so good. The question is: these frameworks have a structure of files and directories that I do not fully understand yet, particularly concerning the implementation of Zend Framework 2 when organized within the implementation of Zend Framework 1. In simpler terms, I need to have the ZF2 application that I have developed running inside a fully functional ZF1 application [there are reasons for this choice that, albeit counter intuitive at first glance, will give us valuable time to work on the transition from the original platform to our new system]. The reason for running ZF2 inside ZF1 is that at certain points in the old application [ZF1], the user will be redirected to the new application [ZF2] without ever leaving the domain.
2 - Both applications [ZF1 and ZF2] will use the same domain (eg -..> Domain.com). The old application currently resides in a subdomain (ZF1 -> school.domain.com) and, for now, the new application will be located in a subdomain of the old application (ZF2 -> imr.school.domain.com). Up to this point, I suppose none of this is complicated to accomplish. However, using the aforementioned structure we still can't read the Session data that was created in the parent domain (school.domain.com) from the subdomain (imr.school.domain.com), which apparently is setting Cookies. We need to read and set these Session values in order for the user to be able to log in the relational modular interface and be redirected to the old application keeping his session active (and vice versa).
How can I achieve this?
In case someone needs an answer to my problem, i've found a solution:
Run ZF1 and ZF2 together
Unfortunately, can't use sub-domains. Had to use school.domain.com/imr.
Not exactly what i've expected, but works.

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.

Joomla application interaction with mobile application

I am currently working on a project involving a Joomla application and a Mobile application. I so far have created both applications and now I want to link the Mobile application to the same database as is used within the joomla application.
I have done some research and it seems that to directly connect to the database is not the best option due to security reasons etc... The use of a web service is recommended.
My understanding of this is this is say for example I have a "player" table in my database which consists of players to output these players via the joomla application in an XML or JSON format which can then be accessed by the mobile application and parsed.
I am curious as to how to go about creating this webservice within the joomla application/framework?
There is a lot of talk in the Joomla world about integrating this into the core in some way. There is even a web services working group, so this is going to be getting easier in the future.
In terms of something to work with, the best code that I have seen is still very sparse, but it could be a good start: https://github.com/techjoomla/Joomla-REST-API. This is by Tech Joomla. I haven't actually played with this code, but it looks to be implementing a REST api, which is probably what you want.
For more code, you may want to get in touch with the working group and see if they have beta code that you could help test and improve for your situation. http://docs.joomla.org/Web_Services_Working_Group

Upgrading a PHP/MYSQL application?

I'm looking for inputs into how I can manage the upgrade process itself of a homegrown php/mysql application. Meaning, if we have a 'stable' version of our php/mysql application working on our production server, and we now want to upgrade it to the next version that we've worked on - how do we go about doing that elegantly? What practices should I be implementing?
What I was planning to do was just to
Ask the developers to stop
checking in code after all stability
/ functionality tests are done
Take the application offline*** (Q: how should I prevent ppl for logging in / accessing public pages? Best practices for that?) but allow access to developers through a secret login page / url
Log onto the production server and check out the latest version
locally***
Have the developers/testers test their code through the secret access page / url***
After that is done, we restore access to all by removing this secret access page / url, removing the site-under-maintenance page and restoring access to all.
***NOTE: A simple way of doing this would be to rename /myapp/ to /myapp.old/ and put the new application version into /myapp.new/ Developers would access /myapp.new/, test to their satisfaction and then after we're done, we would rename this back to /myapp/ (this is just the basic idea)
This is a huge question, and in many ways it will depend on your specific project. But here are some practices to think about:
Put lots of comments in your code. Things that seem perfectly logical now will be confusing when you go back to make changes in a year or two.
Maintain a development version of the site with its own database. You can test changes to the site before publishing to your production site.
Use a PHP framework (such as CakePHP, CodeIgniter, etc). If you are far along on your project, this may be difficult to do. But it will help you write code in a way that is easy to update, and will include a lot of stable, mature functions that you won't have to write from scratch. Using one of these frameworks (and following its best practices) is probably the best way for a beginner to learn to think about writing modular code that's easy to update. This will also encourage you to develop your database in a way that is consistent with the structure of your site.
Write tests (the framework should help you with this) to programatically check your code for errors.
Use a version control system such as Subversion or Git. This allows you to track changes to the site, and easily roll back changes if/when you realize they are buggy.
Comprehensive unit test coverage would be very helpful, as would small, highly cohesive, low-coupled classes. In addition to the unit tests, good coverage from an integration level would be valuable.

Need to Assess whether Joomla is good fit for Web Application Requirement

I have a web application that needs to be built using PHP/MySQL. The application will require documents to be generated from data in the MySQL database. Such documents will be printed and/or emailed and user will be prompted to run a daily print/email job based on business logic.
This application functionality needs to be made available to individual users such that they can upload data, have the system prompt them as to whether letters/emails are to be generated. The site also needs to be able to support a bulletin board, online live training events and will have admin area as well.
Question: Should a hybrid solution be developed such that the data management (upload functionality, and letter production) be a separate part of the site that authenticated Joomla users can access? That is, the document management functionality would exist separately from Joomla, but be called from within it via a link in the Joomla sitemap. Alternatively, should custom modules be developed from within Joomla to accomodate the document management functionality?
Thanks so much for your input!!
Joomla could do the job for you but based on the amount of things you need that differ from a normal Joomla site I would use a framework to build from instead of a CMS. I say this because it sounds like you need a lot more than just a CMS and it can be more work if you try making Joomla do things it wasn't designed to do. In my opinion Joomla is for "web sites" and not as much for "web apps". Of course those terms have overlap but it sounds like you would be better off with a Framework to go off of instead of working around Joomla to get what you want. However if the site is already done in Joomla it may be less work just to make a Joomla add-on.
Since you have to use PHP I would definitely recommend CakePHP for your framework. As for an integrated forum try looking at the links in this post. If that doesn't work for you, try out Vanilla forums (vanillaforums.org) which are very clean and may be easier to integrate into CakePHP than some of the other PHP forums.
If you decide to use CakePHP, check out Cake Forge to see if you can find anything there to make your life even easier.
If you were to use Joomla, the upload functionality and letter production would be written as a custom component. You can write the component to make sure that the current user is authenticated before generating the documents. I would not develop this as a separate application alongside Joomla; it would be easier to write it as a component.
Many forums and forum bridges are available for Joomla, so that would be something you wouldn't have to write.
I'm not sure what kind of live event support you're looking for.

Categories