RESTful Webservice with PHP // Laravel or own setup - rest

i read a lot about frameworks like LARAVEL. I am currently trying to build my own RESTful web service. But doing that "by hand". I have absolutely no experience with these framework systems. It might be a general question, but I want to get your point of view on that.
What is a best practice to that. Is it "useless" building a web service from the ground up and it is common to use this framework? And what is the advantage. I do not want to start all over again and again by finding out that I should have started directly with these kind of frameworks to build the web service.
What are your opinions on that? Manually build everything? Or never do that!

Laravel will save you a lot of time in the long run. A lot of tools are pre-built, and a lot of problems that you will run into are already solved. In my opinion it's well worth it to start with the framework. You will gain skills that will help you out on future projects.

Related

Choosing backend framework for flutter application

I am using flutter as my main framework for building cross-platform apps.
Until this very day, I used Firebase and it was wonderful but I want to expand my knowledge and learn to build full-stack mobile apps.
I was roaming around the web for several days now, and I can't seem to set my mind on backend language to go with flutter.
I am looking for a language that is up to date and much needed in the industry, so don't worry if it is overkill for small apps (I just want to practice for now). and in addition, I need it to go well with the bloc pattern recommended by Google.
I have heard that scala and play are great backend services. also, that ruby on rails is going well with the bloc pattern.
I would like to hear your thoughts and opinions about the situation, what would you choose and why? (In general, not between scala play and RoR)
Thanks a lot in advance!
IMHO, you should to define target tasks, that you will solve.
For example, our company engaged in computer vision and deep learning problems. We choose flask or fastapi python frameworks to build our backend rest-api prototypes, because it`s easy to integrate with tensorflow or pytorch solutions. If we have bottleneck somewhere, that microservices are rewriting in .Net.
If you looking for the most demanded language or framework, see upwork jobs or similar sites to understand, what does the market need today.

Choosing a framework for both app and website [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
There is an old php base website which provides a single service and is working for many years. Now we have decided to change the website itself to become more modern and faster and at the same time providing an app for it and we are going to hire some people for that. As I'm a developer myself (a c++/go fan and mostly in machine learning area) I want to know what are the best options to choose when such thing is needed. I personally think that the whole back-end should work as a RESTful API and then probably something like react and react-native in front for both web and mobile but I'm not sure if this is the best decision we can make.
I want to know what other people with same requirements have done ? Some people recommended us meteor but it seems to be changing very fast and we really need some stable and mature solution without too much maintenance.
Looking forward to hearing your suggestions
I'm a big fan of the REST API + front-end JS framework architecture.
One option would be to build an API with Ruby on Rails. The "rails generate new" command includes an --api option for generating a Rails application that lacks views and serves JSON. You can learn more about building APIs with Rails on the rails-api gem GitHub page. (Keep in mind the rails-api gem has since been rolled into Rails proper.)
Overall, Rails is a fast way to get a services layer up and running. It's fairly simple, and might be a good option for your app, which as you said, provides just one service. However, Rails is also powerful enough to support a much more substantial API.
If you want a REALLY simple Ruby-based services layer, you should check out Sinatra. You could also go full Javascript with Express. It's about as simple as Sinatra.
If you have a background with C++ and Go, you may not want to jump headfirst into these web-heavy technologies. Consider using Java Spring for your services layer. (I would link but I don't have enough rep. Haha)
As far as the front-end goes, you're on the right track with React and Meteor. I'm personally a fan of Angular (specifically Angular 2). It's a really popular JS web app framework -- great for asynchronous Javascript and single page applications. Granted, Angular has a steep learning curve to start, but if you're willing to climb, it pays off.
Let me know if you have any specific questions! Good luck.
Meteor is a bit heavy if all you want is a web site. It depends how much interactivity you want - if it's more of an app, then it's worthwhile doing, and if you want to do ios and android apps, then Meteor is pretty fast to get up and running.
I would recommend to choose a technology that either you are keen to learn, or you have some skills in already. Learning curves mean longer projects.
If you need native mobile application and interactive site than react and react-native with pure API server is a really good solution. I developed several similar services and very satisfied with this combination.
First of all you can share API access layer and part of business logic between both clients.
Second you are using identical technologies on mobile and web. However mobile application has real native UI because React Native don't use browser.
Thirdly server becomes more simple, maintainable and scalable.
Personally I prefer WebSockets as network protocol (look at amazing Go gorilla websocket implementation). But if you need support old browsers or prefer more classic REST API than it's ok also.
Answering based on my comment above, this is all opinionated, but I find that Node/JavaScript tends to be about the best bang for the buck, if all you are trying to do is get through proof of concept stage, and possibly scaling from there. Depending on your back-end needs, you may want to migrate parts, or whole to Go or Python.
On the Front end, using web tooling (mostly centered around node and npm), I would build the primary UI with React and the material-ui components... Targeting a web/browser interface... you can then extend this, in order to support more native-like features. You can build "native" versions using Cordova for Android and iOS. You can use electron as a base for desktop versions.
For the backend, node is a nice place to start, and I feel RethinkDB is a great database for many use cases (despite the changes from commercial to open platform happening now). Mongo is another option, and there are hosted/managed options through a few providers. Alternatively, I'd probably lean towards PostgreSQL via Amazon.
The API server, I'd definitely do a first pass with Node, and then, as needed rewrite whole, or in parts with Go or Python... Go will have better performance and scale without compromising some of the ease of development aspects. Python has very rich tooling, if you need more flexibility than performance for some areas. There are other options, C# is becoming a very good cross-platform option, which I happen to really appreciate as a language. The performance there is very good, though you may find some constraints less appealing than JS or Python.
YMMV with any of these choices.

Difference between "framework" and "web technology"

After speaking with developers, I have questions, "What framework do you use with your app?" and "What web technologies are you using on the front end?".
Therefore, in order to answer the exact question they are asking, what is the difference between "frameworks" and "technologies" in this context? How would I answer these two questions differently or do they both have the same answer?
For example, I thought that in a MEAN stack application, the "technologies" I am using are mongoDB, expressJS, angularJS, and nodeJS. What would be the "framework".
Frameworks are a subset of technologies. All computer languages are technologies. All frameworks are written in computer languages to solve specific problems. The MEAN stack consists of many technologies. NodeJS is a web application framework, that allows JavaScript to run on the server. Express is used to create APIs. Angular is typically used on the client side to provide the front end experience. MongoDB is a technology but not a framework, its a piece of software that allows an application to persist data.
Using your example of the MEAN stack, one could argue that a framework such as AngularJS is a subset of a given technology stack. I often think of a framework as a set of tools for ...... you know what, I think an analogy might better express my thoughts on this.
an analogy
construction = development?
Think of a general contractor (you know, the person(s) you call to come fix things around your house/work). So development is a lot like handy-man/construction work. They fix things, we fix things. They make you a new house or kitchen counter, we make applications... yada yada yada
components
Now think about the separate components in making a house:
plumbing
electric
framing
dry wall
roofing
finish work
I'd equate those to the separate things we use in development to serve our end goal:
database
services
client UI
the tools
Just like a plumber has special tools for his job, I view a framework like AngularJS as just another tool to serve the specialty of Client-side UI work. Bootstrap is a styling framework/tool just like a paint-roller is to finish work. The CSS or the Javascript are the nails and screws, but you can't build just a house with nails and screws, you need tools and methodologies to assemble your parts.
I dunno if that is the best analogy, but it's the one I've used for ages in explaining to laypersons what it is I do for my work and it seems to convey the point fairly well.
in closing...
... I think you can get away with the line of thinking that technology encompasses any frameworks you use. And by mentioning a framework (that they are familiar with) you are implying the technology.

Web Application Architecture?

I’m scoping a new software project and haven’t had much experience with software development. This is a multipart question.
What are some recommended books for web application architecture?
We are basically looking to develop several front end applications (mobile and websites) that can query a central application pool that’ll hit our backend database to retrieve the data. Is there a name for this kind of architecture?
The problem with software development (like most things in life) is that there are so many choices and so many opinions. I would get help from someone with experience and references. Find someone/company that has done something similar. You should also go to any computer store and search around for books on similar architectures (since your tags show iphone, webservices, andriod - there are tons of books out there).
After you get someone to give you advice on the architecture make sure you ask about cost, time, and seeing results frequently.
What are some recommended books for web application architecture?
That depends on the design pattern you will use. MVC (Model-View-Controller) is a good pattern. The Model is the database, Controller is the middle between the other two (where all the business and logic is), and View is what you see in the browser.
There is no one answer as to what MVC should you use. For example you can choose MySQL as the Model, Java Servlets as the Controller and jQuery for View.
We are basically looking to develop several front end applications (mobile and websites) that can query a central application pool that’ll hit our backend database to retrieve the data. Is there a name for this kind of architecture?
Depends on your platform, if you are on Windows then WAMP is a good place to start from, it already has Apache application server, MySQL database, and PHP.
If you already know some HTML, look into PHP. It's not a good language but it gets the job done, it's free, and it gives you a lot of flexibility in getting your idea up and running.
I don't know though, "I don't have much experience in software development." You're going to have your work cut out for you. You will need to know the basics of programming, the basics of HTTP, working with databases, and maybe even some system configuration. You might be getting in over your head.
To answer #2 though - one name you'll commonly see is LAMP - Linux/Apache/MySQL/PHP. Some people sub out some of those things for something else (for example, Python for PHP) but in essence it means a free application stack.

productivity superstar frameworks/tools for side gigs

If you were going to start building web sites as a consulting business on the side -- keeping your day job -- and you also had a toddler and a wife, what frameworks/tools would you pick to save you typing?
Any language.
I'm looking for a productivity superstar stack that won't tie my hands too much when I have to update the site 6 months later, or "evolve" the data model once in production.
It needs to allow me to say "yes" to the client: community features, CMS, security, moderation, AJAX, ...
I would suggest Django. Super simple to get something up and running really quick. You are using Python which has a large library to go with it. For me Ruby on Rails would be a close second.
I'd probably look at DotNetNuke. Its easy to set up (a lot of hosts will do it for you) and easy to use and put together a custom site that business's will be able to maintain in the future.
Its fairly easy to create custom modules that are specific to a business and hundreds of modules for sale (or free) that can be integrated into DNN for special uses.
Take a look at Microsoft's Sharepoint server if you'd like a pre-made framework with many options for plugging in your own code. Sharepoint is kind of a world unto itself but it is a very powerful environment.
Update: I'm surprised to have been voted down on this one. Keep in mind that the questioner specifically requested frameworks that included a CMS. Sharepoint meets this criteria - unlike straight .NET or other web development frameworks.
If you are going to vote the entry down, I think you owe it to the person who asked the question to explain why you don't think he should not even explore it as an option. You could be right - collective wisdom is what voting on SO is all about. But without an explanation, we don't know why you think you are right.
My answers are going to revolve around the .NET stack.
Use Master pages and CSS templates. This makes it so much easier to pop in a new look and feel for your customer.
For sure I'd include the Dynamic Data framework in the .NET world.
Hosting might become an issue for your customer. Questions around managing email addresses, procedures on how to quickly update the website to include the new contact phone number (different for each customer, I'd assume) Consider getting a reseller account on your favorite webhost, and dole out webhosting accounts as appropriate. There are lots of issues around this point. It may turn out to be a nice source of recurring revenue.
Build yourself a few patterns including a database wrapper which would handle all your data calls (i.e. a dll which wraps all your data calls, sets up your ADO.NET objects, runs your sproc calls, and picks up the connstring from app.config or something similar.)
This goes a long way to maintainability as well.
I would recomend going with anything MVC in a language you can undertand! Theres a couple of CMS's in python, php and ruby using that design and well... that allows you to be ready for combat for Ajax and expanding anything very fast.
This is definitely not a question that can be answered.
I prefer asp.net webforms because I think it allows for extremely rapid web app development, but I am sure you will receive recommendations for:
asp.net mvc
Ruby on Rails
PHP and some framework
Python and some framework such as Django
I believe PHP has the most pre-built apps that you can use, though asp.net also has the things you are looking for.
All of these platforms and frameworks can do what you want.
Choose between Rails and Django. They both have different strengths. I like Rails better in general, but Django's admin interface can save you a lot of time when you need it.
There's another factor to take into consideration here: what are you the most familiar with? I believe that some studies have found upwards of a 30% loss of productivity when trying to learn a new language/framework.
Sometimes, there's nothing wrong with just sticking to what you know. But if you're interested in what languages/frameworks to learn, I'll refer you to the other posts because the above was the only thing I really have to add.
I recommend looking into Grails. It uses Groovy which is similiar to Java (so if you know this already you're good to go). Groovy runs on the JVM so you can still use all the great libraries already available for Java. Yet, since it's a dynamic language with a lot of the similar bells and whistles like Ruby you can use closures and that kind of neat stuff when you need/want to. And you're not slowed down by Java's traditonal slow compile-deploy-test development cycle.
Grails is already setup with Hibernate and Spring. You can create CRUD application in practically no-time (pretty much like Rails applications), and at the same time drill down and be able to control every little details since it's built on such proven and well-supported technologies. In addition there's literally hundreds of plugins available that helps you easily set up things like mailing lists, security, AJAX components and so on.
Otherwise, if you want to set up a community site and don't want to code a single line you could always check out ning.com.