CodeIgniter + SQL Backend + React Based Frontend / CMS? [closed] - php

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 days ago.
Improve this question
I am about to inherit quite an old system that was built with CodeIgniter (not sure which version) and runs FuelCMS on the front-end. I am not overly familiar with FuelCMS, CodeIgniter nor PHP, but my assumption is that there is a SQL database (or series of them) that hold the data, and a number of PHP API methods that handle GET/POST requests to this database.
Ideally, I would want to scrap Fuel CMS, but retain the API methods and SQL database, and write a new front-end to replace Fuel, probably in React or NextJS. An alternative would be to use something like KeystoneJS or Directus.
So my questions to those who understand CodeIgniter are along the lines of:
How straight-forward is it to write something on top of a CodeIgniter system? Either a new API that directly queries the database (in NodeJS) or just a front-end that still uses the existing API.
Are there any off-the-shelf solutions (aside from Fuel) that would perhaps offer either some increases in performance, or additional customisation options? My limited experimentation with Fuel has found it to be quite limited.
Appreciate your help!

Related

How to bring parsed files to a unique format [closed]

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 6 years ago.
Improve this question
I have different sources like S3 (json files) and API, and I have to bring all the data to a unique format to store the data in DB.
I tried to parse files and API response on my php back-end but it is too slow.
Is there some best practices or advises how I can do it in a right way?
I'm going to do an Interface with all required methods, and Class' for every source which will implement the Interface.
If I will work with hundreds or thousands files (per hour) Is this approach the best way to do it?
P.S. Currently the project is build on top of Symfony2 framework.
I guess you are forced my traditional RDBMS to convert all sources to specific format.
You may use schema-less systems like MongoDB, Cassandra or even JSON type in MySQL 5.7 to store 3 fields: id, source_type and source_json. This way you create several classes that know how to parse the source_type (ex: S3) and use them accordingly

Laravel 5 and NodeJS [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I am battling with myself about the use of Laravel 5 AND / OR NodeJS.
I want to build a webshop where other webshops or stores can sell their products on. NodeJS drops in when a visitor is viewing an auction page and a product has a new bid. It should be visible without refreshing the (product)page. The rest of the website won't need this functionality.
So, 2 backend environments are awkward, right? So should I pick NodeJS, Laravel 5 or should I just use both for this page only?
You can use both of them. their architecture and nature is different. Laravel is a framework with php language that runs per request but node.js is a platform that is best suitable for streaming and realtime. If you want a CMS like website then I suggest Laravel because Development cost and maitenance is better, due to its active community. If you developed that with Laravel, then you can use push notifications to inform your users from new changes or you can use methods like long pulling.
I don't know about Laravel which is a PHP framework but whatever you want to achieve can be achieved using node js with socket io support. You can have realtime updates using socket io. Please check it out. No need to have two frameworks of different language platforms to achieve a single task. And it is wrong to compare socket io(event based communication engine) to Laravel (php web application framwork).

What is the way to develop modern php based large scalable web application? [closed]

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 7 years ago.
Improve this question
I want to build a web-application using the php, I have started with CodeIgniter and Smarty. The issue is I came to know opinion about this combination like "framework in 2015?, like a joke", there are so many framework and all the updated and and many more thing like socket and node.js and all which make me so confusing.
I know many thing have there own need and work all the way, but I want to develop a site which will expecting 1-5 million hit monthly and I want it fast and efficient, using core php need to do more work which a good framework can do for you but still not sure what's the best approach to go from here.
Any top PHP framework like Laravel or Symfony can handle websites with so much traffic. If you want to create an API based on PHP and leave front-end to another app like Angular, you may also take a look a Lumen or Slim Framework.
I know it's a broad question but answer is simple, these frameworks give you the tools, as long as you follow modern principles and use caching they will be able to serve that many requests.

PHP Ajax right structure [closed]

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
I found a similar questions, but it's not exactly what I am looking for.
I write web site using php. For dynamic content I use jQuery Ajax.
I have 20-50 functions and I want to use Ajax to call these functions and take JSON.
Idea is to pass parametres via ajax POST. Pages works with database and job is done.
The question - how better organize it?
Should I create 50 separate pages like:
mysite.com/ajax/delete_project.php
mysite.com/ajax/delete_user.php
mysite.com/ajax/show_user_info.php
mysite.com/ajax/show_my_messages.php
mysite.com/ajax/show_my_tasks.php
mysite.com/ajax/send_message.php
.......
or create one page? or maybe i am completely wrong with all of that
Ideally you should be using a framework, such as Symfony. Otherwise, I usually keep all the functions for each content type in a single file. So you might have:
mysite.com/api/blog_posts.php which would implement GET, POST, PUT, DEL, etc... for all the blog posts. Meanwhile, mysite.com/api/messages.php would handle that for all messages.
You must start using an MVC framework if not using already. I would say Laravel should be a good choice, it's easy to learn, feature-rich and fun to work with. Start looking into Laravel Routes.
Moving to MVC is the best way to start getting into shape in your case.

Adjusting to ASP from PHP [closed]

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
I'm in the process of learning ASP.NET and I'm having a few difficulties with certain things. The main difficulty I have right now is accessing data from a database. Usually in PHP in the model I'd just write an SQL query for a specific model function and then that'd query the DB and return the results I want to the calling controller. Is doing this fine in ASP MVC? And if so how do you do it? The tutorial I was following started using scaffolding and I want to avoid that as I want to fully understand how it all fits together.
I myself started in PHP and gradually moved to .NET. The way I manage my database is via Entity Framework. I know it may sound like you've got to learn yet another useless thing, but it is actually very simple. If you just want to learn the concept: use code first approach.
This is how it works: you create a bunch of models (that you will need anyway its called Model-View-Controller for a reason) that are nothing but objects. Those models are used to build your database. So you no longer need to set up the database manually (e.g. phpMyAdmin). It sounds quite amazing but that's how it works and then you use LINQ (or LINQ-to-SQL) to get queries.
This an example of a LINQ-to-SQL query:
var query = from u in dbContext.User where u.UserID == 1 select u;
This will come useful later on as well when you want to validate information etc. Here is a great starting tutorial (just watch the first 4 of those videos):
https://www.youtube.com/watch?v=Z7713GBhi4k&list=PL6n9fhu94yhUPBSX-E2aJCnCR3-_6zBZx
Moving from PHP to .NET is a big move, but it is really worth it.
Good Luck!

Categories