My website done in PHP is currently deployed in AWS server.
Client wants to move it to Heroku for integrating the database with Salesforce.
Is it really necessary?
Salesforce have their API by which I can sync data from my project's MySQL database to Salesforce database.
Will moving the project to Heroku provide any extra advantages that AWS doesn't have ?
thanks in advance for your answers
Actually, no special advantages in approach which your client provide. In both cases you will need to implement logic for integration and interaction with SF part, and I don't see any benefits in migration to Heroku, but I see additional work for migration your current infrastructure.
Although Heroku provides some features for integration with SF out of the box, it seems to me, it will be cheaper and easier to add SF integration to your current project. But it's depends on many factors (for example, how is fit the Heroku platform for your solution at all), so possible best way is to implement PoC for both cases (if it's possible) and compare it.
Related
First of all I hope I'm allowed to ask such a broad question (first time doing so).
Ok so I'm very new to React & I need a project to work on so I thought I'd recreate my portfolio (currently created in laravel) as a react & react native app.
My questions are:
Would a Rest Api NETCORE backend be a good choice for react ?
My experience is more in ASPNET MVC than Core, should i just stick
with MVC API's for now (i've already started creating a NETCORE Api
for learning purposes)?
Would a php framework such as CodeIgniter be better for this kind of
job?
My main question is if this is a good approach? I'd like to have a basic backend (auth, news posts, portfolio items etc) and then continue building on my react apps.
I was thinking that by creating a Rest API backend it would save me a lot of trouble when trying to create a react app for PC,Android or whatever (same back-end, different client).
P.S: i'm going to host my API on Azure's free websites if its ASPNET or a shared hosting if its PHP, that is the reason for which im moving away from laravel (so laravel is a no-no).
P.S2: Firebase or other clouds (except Azure) are a no-go for me. I have access to lots of resources and i'd like to use them & not use free services like firebase or whatnot.
Just giving my 2 pence here, as this is really opinion based!
In terms of the backend, it's up to you, whatever you feel more comfortable with - but I would give a keen eye on the architecture of the backend system you build.
My choice would be to create a micro services based architecture where you create simple, atomic services which only deal within their domain. For example, you could create 'Common Services' - services which can be used as dependancies by other services (events, encryption, documents etc..) then create atomic services which deal with an aspect of your application such as User Service, Payment Service, Product Service, Basket Service etc..
The idea is simple, to create simple data driven CRUD services which are modular, atomic and reusable. I've found that learning new technology is great but understanding and learning good programming architecture is even more rewarding. You can structure data to make it the most efficient for you.
Once you have built a service, you could use services like Swagger UI to automate documentation and create testing suites for them. If you haven't used Swagger I throughly recommend it.
Implement testing for each service, and go through the whole lifecycle of software development. That will really go far in your portfolio.
Here are some articles relating to building microservices in ASP.NET Core
https://learn.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/data-driven-crud-microservice
Swagger
https://swagger.io/
As a side note, I do not develop in ASP nor any other microsoft stack - but the principle is the same
UPDATE
The issue with building monolithic applications is that the code base can get more and more complicated and huge as your app grows. Some advantages of Micorservices are:
Scalability
Fault Insolation
Eliminates long-term commitment to a single technology stack
Easier for developers to understand (and document)
My type of set up would be using Spring Boot (Java) and using Eureka Server - but you are into the MS Stack, but the link I've given you above shows how to create a basic CRUD microservice with Net Core. I would give that a go, and see how it goes, then you can move to CI/CD for Azure!
Moving on from just a simple CRUD API, you can introduce WS connections with event driven updates (server to client) rather than asking for new data.
An Architect that I once worked with (a genius guy) told me never to be too reliant on a 'Framework' - they're cool when they are doing well, but a great application should be flexible to change, so I wouldn't rely too much upon a 'framework' but that was just his opinion.
Try API Platform - dockerized, but deployable to php hosting (based on Symfony), generates react-admin based admin and optional web/mobile clients (IMHO the weakest parts of this project), openAPI (swagger) docs, easily usable with graphQL ... just try.
Building portfolio with Laravel isn't a good idea. Use Gatsby - you can use graphql (WordPress, contentfull) as a source, generate static site.
We as developers believe that Openshift v2 was a great platform for developing and deploying apps, now the Life of v2 is going to be end and the v3.x is arrived to play its role.
As a new to v3 architecture, I would say this is bit difficult to get started as easy as v2 was, I have some questions to ask in first place :
In v2 we can create an application and there comes a link to clone the repo locally, how can we create a PHP application on v3 without Github repo and clone that to local repo so that source may be private?
Adding databases on v2 were much easier, but on v3 it is like a nightmare for developers like me, How can we add MySQL DB to our PHP application on v3?
In v2 we make a change to source code, commit and push the app was live in short, How can we commit new changes in v3?
these are the basic questions which must be answered, any resource would be a life saving.
(1) To avoid using GitHub, or any other Git repository hosting service, you need to use a binary build. Although the post is about Django and Python, you can see the steps for using a binary build in:
https://blog.openshift.com/migrating-django-applications-openshift-3/
(2) To add a database, you go Add to Project, find the database you want to use there and create it. Then set the environment variables against the deployment configuration of the front end application so it knows where the database is and what login credentials are. An example of that can be found in:
https://blog.openshift.com/adding-database-openshift-online-3/
(3) If using a binary build as you seem you will want to due to (1), then you start a new build and tell it to use the code from your local directory. This is explained in same post given for (1).
Also suggest you work through example application in:
https://www.openshift.com/promotions/for-developers.html
This will give you further background on using OpenShift version 3.
If you want to keep the same workflow you had in OpenShift v2 (commit/push/live), sign up for a free account on GitLab.com or Bitbucket.com which both include free private repos (or bite the bullet and pay for an account on GitHub.com).
Then, check out Graham's post on best practices for using private git repos with OpenShift v3, which links to several guides on the subject: https://blog.openshift.com/private-git-repositories-part-1-best-practices/
As for the DB, you can add the database after the fact as Graham described (add a database to your project, tell your PHP application which variables to look for, then set those environment variables for your PHP app's deployment config), or you can write a re-usable template to deploy your application to any OpenShift cluster that includes the PHP app and database along with their configuration (see CakePHP template examples). I prefer creating a template for my apps with v3, but maybe I'm crazy :)
Now that I have managed to deploy one of my services (an API written in PHP) to GAE flexible using a custom Dockerfile,
I would like to deploy another service that would be a Mongodb database, so that my PHP API can store data in Mongodb.
Because I would like to build all of my microservices within GAE flexible, I was thinking of using the same process, which is deploying another custom Dockerfile for building my Mongodb instances.
Now I was wondering if that is the correct approach? I am concerned about the statefullness of my Mongodb instances in that case. Will the data be lost when the instances are restarted or when I deploy another version, is there another more recommended approach for what I am trying to do?
PS: I would like not to have to use Google Datastore, mainly since I'm using the Symfony PHP framework with a lot of useful bundles to interact with Mongo.
I wouldn't recommend deploying MongoDB on GAE, you could easily loose your data, and I don't think GAE features were made for hosting databases. I think it'd give more headaches than solutions.
If you want to use docker images, I'd suggest using Google Container Engine. You just need to remember that you must use a persistent disk in order to not loose data. For development and even small production apps it should fulfill all your needs.
But from my experience, it's much better and efficient to deploy your MongoDB server on Google Compute Engine instances. You can use Cloud Launcher to deploy (cloud launcher will launch your MongoDB almost ready to use, you'd just need to add the users/authentication)
I'm thinking in create a webapplication with cakephp but consuming python's appengine webservice. But, to install cakephp etc, I need to configure the database. Appengine uses another kind of datastorage, with is different from mysql, etc.
I was thinking in store the data in appengine, and using the python webservices, and with the cakephp application comunicating with the webservice, for insert and retrieve data.
Is there any good resource for this, or is it unpossible.
Obs: also opened for a possibility for developing the webapplicaiton completely in python running in appengine. If anyone has a good resource.
Thanks.
I think that you should try different solution: http://aws.amazon.com/simpledb/
It appears that CakePHP is a MVC framework that's very similar to django, which is included in app engine for python. I'm not sure why you would want to store your data in google app engine, unless you're dealing with an extremely large amount of data, in which case you're likely comfortable enough working in python to just make the app work entirely on GAE.
See the official docs for more info:
http://code.google.com/appengine/docs/python/overview.html
http://code.google.com/appengine/articles/django.html
What you can do is run your CakePHP app on a standard LAMP web host and access the GAE Data Store through a REST or RPC web service. This isn't such a bad idea if you already have a CakePHP front-end that deals with RPCs in the backend, but if your Cake app stores all it's Models in MySQL it could take considerable effort to adapt it.CakePHP Models abstract their storage method using the DataSource class. You might be able to find a DataSource class that uses REST or RPC. However, if you don't have a very considerable investment in CakePHP Controllers and Templates I would suggest simply building your app entirely in GAE
You can not run PHP on GAE. If you run PHP somewhere, it is a bad architecture to go over the internet for your data. It will be slooooow and a nightmare to develop in.
You should store your data where you run your php, unless you must have a distributed, globally scaling architecture, which afaiu not the case.
There's a detailed tutorial on getting CakePHP up using the PHP runtime that Google recently announced. http://aymanrb.blogspot.com/2013/05/cakephp-deployment-on-google-app-engine.html
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.