Is it sensible to use symfony as native app api? - reactjs

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.

Related

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.

What is the best way to do web scraping from an BlackBerry (10 OS) App?

I am writing an BlackBerry app and I need to scrape about 50+ websites for data.
Does anyone know of any good client-side solutions that I can use ? I dont want to build a backend just for this.
I actually wrote a blog posting about this a while back. The example uses screen-scraper, but the principles would apply regardless of what you decide to use for your scraping solution. I deliberately wrote the posting to be relatively agnostic toward specific technologies, so it it will at least hopefully give you a few ideas.

CakePHP and SOA

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.

How can I develop a database for users to access via a browser

Years ago (pre-web) I used to be a Fortran developer (yes it was a very long time ago!) but these days I run a small non-IT business. I would like to develop a database application for my clients to access via a browser (or maybe down the line via a mobile phone). I haven't done any programming for a while apart from some VB macros in Microsoft Excel. I would be grateful if anyone could suggest the best language/technology to learn to get me heading in the right direction.
As Neil said in his comments there are dozens of different, valid answers to this.
Usually I would suggest going with a language you already know, but neither Fortran or VBA are really suited for this task, as far as I know.
Personally I would suggest Django, which is a web framework written in Python. It simplifies many common tasks and it is very well documented.
But there are many more possible solutions.
Before I started with a framework I'd break the problem into pieces. If you've never done anything with a database before you'll find that challenging enough without piling web or mobile on top of it.
Model your problem and get a good object or data model in place. Test that thoroughly without thinking about UI. Once you have that, perhaps you can expose it as services that any UI can call.
You'll quickly become overwhelmed if you try to do it all at once.
Here's another thought: If these are paying customers, why not do yourself and them a favor and hire someone that knows how to do this? It's great that you used to write Fortran, but if you haven't kept up you won't be doing your business any good by putting out a bad first effort for customers to see.
Do it right - get a professional. Do your learning on your own time.
You can use ASP.NET and SQL Server to get something online that will allow users to edit a database table fairly easily. They've simplified it to the point where you can drag and drop the necessary controls (GridView and a SqlDataSource for instance) and define your datasource in a wizard for most simple table CRUD functionality. Basically give users the ability to edit a table without writing any code.
If you need to do something a little more difficult it's easy to write code that will add functionality to the original drag/drop stuff you did.
There are lots of good resources out there for asp.net and C# also, so it will help you get up to speed quickly.
Keep in mind that I work almost entirely with .NET/SQL Server so my opinion will be slanted towards them...

Is NetBiscuits any good?

Has anybody got any real world stories build mobile web sites with NetBiscuits?
Someone told me it was the next big thing in mobile development (http://www.netbiscuits.com/home) and it looks pretty good from their site. Just wondered if anybody (besides them) has actually used it.
From a few months time working with it, I can say that they're indeed one of the best (if not the best) out there. The support is also insanely quick and good.
Only thing making me stop using it is the price. Especially if you're a small company and want to use their POI feature.
However I have yet to find a good replacement. May end up rolling my own version...
Edit: Related question.
They have created an entire xml (bml) based markup language that emulates html that has a very steep learning curve. I would seriously reconsider using it.
I have seen it working nicely. It also supports ASP.NET controls SDK that can be used to write ASP.NET app from Visual Studio. Once this app is deployed on your premise, you can use live bridge agent to connect this app to a Live Bridge server that Net Biscuits hosts. Your app is called a backend app in this case. This is a very useful feature when you do want to have Forms capability in your app and also want it to be accessible on NetBiscuits platform.
Check http://kb.netbiscuits.com/tactile/edc/livebridge_help.html. BiscuitML is also easier to grasp.
Look out for performance issues though. Customers in Australia have had response time issues - probably due to the Cloud Platform being located in USA/UK.

Resources