CakePHP and SOA - cakephp

I am a PHP developer and wanted to develop a large scale web application in PHP. I have an essay about EMR systems (electronic medical records) using Service Oriented Architecture (SOA). I was thinking about using the CakePHP framework.
Is CakePHP good for large scale web applications and is it good for SOA?
I am looking forward to your guidance.
thanks for your reply burzum, i am thinking to implement it using REST and CakePHP 2. I found some tutorials on the net and of course at cakephp docs, but i have difficulties to catch the point..using REST with CakePHP.Maybe i need more reading about RESTful WS..any suggestions or links to extra resources will be welcomed

Yes, we have a huge app in the same field with over 250 tables and it's working fine and fast. we use a lot of caching techniques and use PostgreSql.
I suggest you to follow the conventions of the framework and get some experience with the Framework before you start building such a huge app that requires high security standards and a good performance.
When it comes to this performance bullshit talk I would say it does not matter which framework you use but how good your team of programmers can use the power of the framework. You can be successfully or build a huge pile of fail with any framework. I've seen both cases in CakePP.
We have played recently a little bullshit bingo with benchmarks for fun and in fact CakePHP 2.1 was beating Yii in their own silly benchmark (just echoing something) if we used more than one simultaneous request. Using a single request Yii was faster.

Related

Is it sensible to use symfony as native app api?

Good day,
I have a question for the experienced developers:
At the moment I work a lot with the PHP framework Symfony.
Out of interest, I would now like to delve into the topic of native app development
using React.
As part of a practice project, I want to transfer/sync data between a SQL DB on a server and the app.
My question is, is it a good way to write a symfony application for this,
which only acts as an API for the database?
Does this make sense from a performance and effort point of view?
What alternative ways are there?
Which ways of storing data on servers are used most frequently in the productive environment?
I am happy about suggestions, links and informations in every direction.
Thanks and Greetings
My answers (based on my experiences and my collegues answers) :
As you can see on the documentation here it's very easy to made your own api with Symfony tkants to API Platform. For the performance it's very acceptable especially if you use Symfony (>= 5.4) because a lot of cleaning has been done in the kernel and PHP 8 for its performance improvements especially at compile time (JIT compiletor). More info here if you need it.
Alternatively you can create your API rest with NodeJS but it doesn't bring much especially if your application is already made in PHP. Adding a layer can sometimes make things heavier instead of lighter.
It's depend of your need, the size, the number of users ... You have to determine the target to choose the better solution. If you have it already I can help you.

porting an app built using Tornado framework to Django framework

I have an app that was developed using Tornado framework and Angularjs.
the app is basically a game with two type of users a moderator and players. the moderator and players exchange data in "real time" and a graph is updated based on their input.
I am a decent coder but new to web development and this is just an in case question. Since the app has some issues, and since I will have to learn a framework anyway, I would rather learn Django. I was wondering if there is a resource out there that makes the conversion easier?
What I am looking for is advice on how to tackle this in a way where I don't have to go through the documentation of both frameworks before I can do anything useful.
Ideally, I'd like to incrementally learn more about both frameworks as I make meaningful edits to the app.
From what I see you need to get familiar with two things. Django Rest Framework` which is a great tool, with a really good documentation. Basically it helps you to communicate with you application by REST API. And of course Django.
They also have a tutorial made for starting your way with Django. Which basically have everything needed to start. If you have an experience with Tornado, you will have no problem to work with Django. Here is a link to tutorial.

Opinion - custom build website framework vs CakePHP

I have little by little built a website over the course of the past year and am now at a stage where the whole thing can go commercial, which means that I will face some tough questions regarding security, privacy, etc.
Since this is a situation where a hobby turned into a possible professional product, I am now rethinking how far I have to take this in order to really provide a product that is considered "safe" and stable.
The website was put together based on a Bootstrap 3 theme design, runs mostly on HTML, JavaScript, jQuery, PHP with Mysqli interactions and naturally has a SSL certificate. About a dozen plugins from various websites such as datatables, PHPmailer, jQuery-bootstrap-upload, blueimp gallery, etc. do the things I need them to do and I have always paid attention to properly mysqli_real_escape input values and write error handlers for all interactions. In short, there is no real framework here, things are more thrown together.
I am now being challenged that this is not considered a safe/stable solution and instead should recreate the whole website based on the CakePHP framework, which is something I am not familiar with and will take a fair amount of time to get used to and will definitely screw up my timeline.
So in short what I am asking is this: How important is it for a small and relatively simple website (i really dont do any complex code here...) to be built on a framework such as CakePHP in order to be perceived as safe and secure?
I understand there is no real answer to this, but I was just wondering whether building on an established framework like CakePHP is considered the only way to go or if a custom made framework is acceptable.
Thanks for the advice.
I was in your situation a couple years ago. I had started a site that, in the first year had about ~50 unique visitors. The second year I had about ~1500 unique visitors. What does this mean to a developer.
Optimize the response time - caching.
You need to optimize how you fetch data. Can you cache some queries? - CakePHP comes with caching Redis, Memcached etc.
Multiple Datasources - ElasticSearch, Mysql, Redis
Now that my website is huge, visitors might start to demand more functionality from the website. How do i deal with multiple datasources? CakePHP offers ways to interact with multiple datasources like ElasticSearch, Mysql, Redis
Code maintenance - Raw code vs a Framework
Do I need to google, and stackoverflow to reinvent the wheel? CakePHP comes with the best templating system and helpers.
Cutting down on development time.
If I am coding everything myself - I will spend more time developing. Using CakePHP I spend more time improving my website's data.
Decoupling
Does my data need to be managed by Cakephp, can I use Django, REST APIs etc. In the end I decoupled my website. I use Django to manage data entry, and CakePHP to present the data to visitors using Django REST framework.
No one can tell you definitely use CakePHP. However CakePHP3 , in my professional opinion, has a short learning curve. Using namespaces you can still use your current code in CakePHP and transition slowly into using CakePHP fully. CakePHP documentation is very good. You should be able to get a basic site wrkoing within an hour.

Hybrid App Maker vs Mobile Frameworks

When do you think is best to to use a mobile App Maker (Ex: Appery.io) and when to code using a framework (Ex: Ionic)?
Of course, that coding with a framework doesn't tie you to any App Maker label... But, besides that, any other matter I should consider.
I need to start a simple project that querys a some REST API and have some doubts.
So I thought about posting here to open my head to someone who has walked this road before.
I don't mean this to be an open ended question on what is the best framework and comparing them all. I am just trying to establish is it really necessary to go down the heavier more complicated frameworks or can I get a mature long term solution using something like Appery?
Thanks!
When it comes to mobile apps, and as in your case, apps that load dynamic data from server, it is usually better to go for mobile app frameworks rather than, for online app builders. There can be multiple reasons for this :
App builders usually come with a lot of features, but they almost always fail for some Custom client requirements.
They usually tend to cater the need for static apps, when it comes to dynamic apps that have a lot of data manipulation stuff, you should prefer your own framework and logic to do so..
You can almost everytime modify / tweak a framework, You can't do so with an appbuilder.
You aren't sharing your code on cloud [Matters if you are working for some critical organization / client].
You have total control over your code / view. You can tweak it, twist it and almost guarantee total ownership. All you are bound to is the limitation your framework imposes.
You can mix and match frameworks, that doesn't applies for an appbuilder.
These are some of my quick thoughts, there can be [and are] many more reasons for switching towards a mobile framework..
AppMakers are generally there as tools for Rapid Prototyping. These days they market that you can make production apps using Appmakers but when you start using them you will notice that one or some other requirement you have cannot be implemented. In my experience, app development time seems to be less for AppMakers but it is generally more. On the other hand Mobile App Frameworks provide a lot of flexibility and code reusability too.

Expert developer on the Microsoft stack, can't decide between GAE or Microsoft stack

I am creating a website with a friend to try and make some money. Basically, we want to let users aggregate data from different social networking site's APIs (FaceBook, Twitter, etc.) and do some cool things with the data.
My non-developer friend is sold on the Google App Engine because it costs nothing at first, and then you pay as your traffic/data increases. I am torn. I like being able to bootstrap the business like that and have no startup costs (other than time) but I am worried about learning a whole new "programming world" as Joel Spolsky would put it.
I am so comfortable with C#, ASP.NET MVC and SQL Server that I think moving to something like Java or Python on top of BigTable would end up taking about 3x longer to develop (if not more).
Can anyone give me some guidance on this? Basically, I am wondering if there is any way I can have the following with the Microsoft stack:
Free hosting up to some limit of traffic
Ability to scale out at a cost similar to what Google offers with GAE (maybe the hosting service would need to have support for a good scalable persistence solution--like Couch DB?)
For #1, I am OK if that means hosting it on my own server for the ALPHA/BETA phases. For #2 I am hoping that there is a good hosting service out there who can put me on shared hosting servers and charge by the traffic. Does that exist? Thanks!
Unfortunately when it comes to a similar platform then you won't find a MS Stack version. Windows Azure comes close but this is more akin to Amazon's EC2.
The python stack in GAE is really easy to use and was able to make the transition quite quickly. Django is a MVC that is really popular and quite simple to use. It also gives you a ORM to write to BigTable which means you don't actually have to care about it.
The Java implementation is very similar and you can use really well know MVC frameworks for creating your app like Spring
I am also a .NET expert, but I have been using Python-AppEngine for hobby/entrepreneurial purposes specifically because it allows me to bootstrap an new web application at no initial cost. That is critical for me, as I have no budget at all for side projects, and so far, with many deployed AppEngine applications, I haven't spent a penny on it.
Learning a new language can seem like a drag at first, but I have come to find my new expertise in Python to be invaluable. Remember that the best and most employable developers are usually generalists with a broad and flexible palette of skills. My resume features C# and .NET as well as Python and Ruby/Ruby on Rails, and I have gotten very positive reaction from potential clients and employers.
Learning Python was dead easy. Getting a handle on WebOb and Django templates took more effort, but nothing extraordinary. Over time, I built up my own framework layer on top of those things that incorporates the best ideas from Rails and ASP.NET MVC that I missed. You can take a look at it on Google Code, and you will see a number of ideas that specifically borrowed from ASP.NET MVC.

Resources