I am working on a project and I was simply wondering how to integrate a backend surface made in spring.io into a wordpress website?
I read about converting wordpress into spring.io using JSON but I want to integrate a backend service for a front end wordpress.
If it works the results will be a backend service like database works with the wordpress website.
You should give the community project Spring Content a look. The aim of this project is to quickly and easily create cloud-native, agile "Content Services" with the Spring framework. Essentially, exactly what you are asking for I think.
Best of luck!
I'm currently building a web app using Laravel 5.1 and would like to start creating a native application so that my users can use their phones. I have decided that using the Ionic Framework is likely the best approach for the app and just have a few questions on marrying the two together.
I've got routes in Laravel that looks like this example:
app.dev/geckos - This is a GET request.
Which takes the currently authenticated user, uses their ID and fetches all geckos that match their user ID. It does return a blade view however.
I assume that when working with something like Ionic, the GET request would need to return JSON instead on order to loop through properly?
Is there a way that I can alter my controller to serve JSON based on if the route was something like this instead:
app.dev/api/v1/geckos
Both routes would use the GeckoController#index method, ideally I just don't want to repeat the code.
I'm fairly new to Laravel and very new to Ionic. So if I'm over complicating this theory please let me know.
Any information is appreciated on this,
Andy
Another solution which I used is to have 1. application in Laravel, which is a RESTful JSON API. Then you would have 2. Web app (in AngularJS) and 3. Mobile app in Ionic (which is based on AngularJS).
So you will create two separate applications, mobile and web, which both communicate with the same JSON API. The web would be a single-page AngularJS application, so that way you can reuse all the Angular services which communicate with the API, maybe even some controllers between your mobile Ionic and Web application.
You will save some time when creating two separate responses for mobile/web application, since you would create only one: JSON response. AngularJS will take care of rendering in both applications, that way you won't have to create separate templates for web applications in Blade, instead make all the rendering using Angular in both applications. There will be some nuances in rendering of the same content in Web and Mobile app, but it would only require creating separate js directives/css styles/html templates for both applications, using Blade you wouldn't be able to reuse any view related code between applications. Also you will be able to use the same Authentication method for both applications.
To sum up, this solution should be cleaner then your solution because you will be able to reuse backend entirely between the applications, reuse a lot of fronted stuff (like input validation code, services, filters,..), reuse Authentication and introduce looser coupling and have much clearer structure then the ugly response type switch in controllers.
EDIT:
So this can be a rough example of the structure of such project:
1. API - REST in Laravel, returning JSON
-Controllers
-Session // actions CREATE, DELETE
-User // actions CREATE, VIEW, UPDATE, DELETE..
-Gecko
2. JS application - Angular App, for both mobile and web app
-common //controllers, services, filters - most of the frontend logic which reusable between both applications
-controllers.js
-services.js
-filters.js
-mobile //this part can be hosted on some server or part of the mobile application
-app.js //separate configs for mobile app
-controllers.js //controllers only for mobile app
-directives.js
-web
-app.js //separate configs for web app (links to HTML template URLS,...)
-controllers.js //controllers only for web app
-directives.js
-services.js //or even services only for web app
3. WEB APP
-HTML Templates - bunch of static .HTML files
-Home
-Login
-Register
-Gecko
-Gecko Views...
-Some index file with layout template, which includes everything from js/common and js/web, entry point to your web application
4. MOBILE APP
-www
-index.html // must include everything from js/common and js/mobile
-templates
-Gecko
-Gecko Views...
But the structure may vary significantly, depending on what part of mobile application you want to have hosted on web server and which should be available offline, or how you want to host it, how detailed the structure might be..
Doing this would be messy because your single controller action will be returning two totally different responses.
However if you go down this route, you could add an additional header to the request from the mobile app, and then check for this to switch the response.
I know that there are some sites which can figure out which tools have developers used when they build the web site.
For example, I can figure out whether the site has been built with wordpress or not from this page www.isitwp.com
Is there any ways to figure out what kind of framework the web site is using? or figure out the web site which has been built by using spring framework?
How can I know?
I have created an Umbraco site using the latest version (6.1.6) as an MVC site. Now I have an existing website which retrieves a list of users. I would like to integrate these pages into Umbraco under a custom section. In previous versions of Umbraco (4.7), I used to create user controls in .NET to perform my non-Umbraco db tasks and then link them up in Umbraco by dropping the DLL and the user control in.
How do I do this with the MVC site? I did a bit of reading up on SurfaceController and RenderMVCController but am confused as I really don't want to use any Umbraco related controllers. I would just like to integrate the existing views/controllers into the Umbraco site like I used to do with .NET user controls
Any ideas how this can be achieved?
You can still use webforms controls like you did before. Umbraco lets you mix Web Forms and MVC, however it's based on the page. As far as I'm aware, you can't mix MVC and Web Forms functionality into a single page, but you can have both Web Forms and MVC pages in your application.
If you are able to get by with it, you can create a new page using a Master Page template (non-MVC) and use your usercontrol macros there.
Can I use spring liferay for mobile web development?
This is very basic question but I tried on google but I can't find any tutorial on this. Can anyone suggest anything on this.
Yes you can use it I think, since Spring is a server side java framework and for mobile web-development I don't think you need to do anything special apart from customizing the look-and-feel of the page which can be done through themes in liferay.
Starting from Liferay 6.1 you can even define Mobile Device Rules.
For a quick demo of this you can go to Liferay site, and try to change the window size of the browser and then see how the page changes. Even you can try to view this site in a mobile phone.
Hope this helps.