Magento templating system vs? - php

I am new to Magento and I am about to build an e-commerce site for a client.
Should I be using Magento's templating system to build the front end or should I consume it via the REST API?
And is there another way to it?
What are the pros and cons of each option?

If you plan to use Magento, then you should use it as it is.
I don't see any advantage in using the REST API just to retrieve data and show it as you want.
The REST API does not support everything Magento has to offer. It will also add a new layer between the frontend and the actual data. This may result in errors or it will slow down your website.
You should use the internal API and the templateing system. Magento is intended to be an e-commerce website.
But I'm very curious to what your other option is.

Related

Wordpress, entity Framework and REST Services integration... POSSIBLE?

We are moving our sites to WordPress and I have a perplexing problem that I have no idea where to start.
We have a Product Information Manager all stored in SQL Server. I'm looking for a way to integrate products into the WordPress system.
There is a data access layer using entity Framework right now which we are using an asp.net solution right now to access it.
I'm thinking of asking our database developer to create REST services for product information, but I'm not sure how to go about integrating this into WordPress... if possible.
Yes it's possible.
Depending on how many models you need to expose, creating the services may also be trivial if you leverage Web API.
As far as integrating it into WordPress, that's a PHP task, adding pages or editing your theme. So you're going to need to Google some samples on reading JSON or XML in PHP, but that's pretty much the extent of it here. I see no technical limitations.
You can likely start here:
http://php.net/manual/en/function.json-decode.php
Cheers.
Yes you can definitely do that . Once you expose it through REST services or any other SOAP based web service. You can consume thrm from your Wordpress . There are plugins available that might help you.
Take a look here
You can also create your own plugin if you want . I will agree with #MisterJames for other Php stuff and integration that you need to do.

Integration Methods of Sugar CRM

I am going to develop a complex web application related to affiliates. I want to integrate sugarCRM as the CRM module of my affiliate application. I have some misunderstandings related to integration methods. From FAQs at Sugar CRM website, It is stated that there are two ways to integrate one is Webservice API and second is Module Builder.
Now let me first tell you about my understanding. If you have a standalone application running on your server and you want to integrate the CRM then you have to choose Web Services API for it. But if you have installed CRM on your server and not having any other standalone application then you can use Module Builder Method. It is just like you like you have installed any CMS and creates modules to extend the functionality.
Am I rite?
OR I am having wrong understanding about CRM integration? For standalone application we need to use only Web Services API in which we will use data using web services and show in our system?
Module Builder allows you to easily add new functionality to SugarCRM though an easy to use GUI. If you want to track company Desks, Widgets, Recordings, Headaches,....anything, you would use Module Builder to add your specific needs to SugarCRM. You can even relate these new module items to the core modules such as contacts, accounts, etc.
Web Services API is a way to access SugarCRM data and functionality from non-SugarCRM code. Web Services API can be used to Create, Read, Update, and Modify existing SugarCRM records through API calls. You can use SOAP or REST to communicate with SugarCRM. This includes accessing any newly created custom modules you built using Module Builder. With Web Services API, you could access how many resources, Widgets, Recordings, or Headaches from another internal or external application.
Web Service API is almost always the correct way, if you need to integrate with SugarCRM from an external application. This method is great for small-medium amounts of data and if you need your application to be in almost sync with sugarCRM.
Other methods exists which are better suited for larger amount of data and if "realtime" sync is not needed. However, they are usually more complex and require more development and understanding of SugarCRM.
It is e.g. possible to create a PHP batch script on the SugarCRM server, which interfaces with SugarCRM API and exports/imports the given information from/to another system.
Apart that the situation you describe is the reason why webservices exist, the ones provided by SugarCRM are extremelly flexible and allow you to access each and every feature, not only the ones provided by default, but also the ones you might develop and/or install.
Concluding, if what you really need is to perform an integration between your application and SugarCRM, you don't need to learn how to work with SugarCRM (from a developers perspective), you only need to know how to work with webservices, Soap or Rest.

How would I integrate existing zend FW apps into 1 application?

An existing 8+ year old application is being migrated from a self-contained website to a webservice-oriented architecture to allow among other things, external parties access to the calculations and data within the application.
The application allows visitors to access insurance-related information, calculate price quotes and contact agents.
The original logic of the application has been extracted from the main application to a SOAP service - so far, so good.
Based on in-house knowledge of Zend FW, the choice was made to drop the legacy code with many downsides and move to a more robust and community-backed framework - Zend.
An initial Zend FW app has been built that consumes the WSDL and allows searching and displaying of customers. After that was finished we wanted to integrate external applications/modules for components such as a basic (!) cms, mass-mailings, polls etc.
As we consider those components essential for the end-product but not our own core-product, we thus want to use external applications for this.
However - looking at e.g. tomatocms and digitalus etc., they seem to require us to build our product into theirs - and we want it the other way around. CMS pages are the exception, and not the rule.
Integrating authentication among these applications seems very difficult, as each seems to want to be 'the' application.
TL;DR:
What would be the best solutions to integrate a CMS or other apps into an existing/in progress zend FW app?
I think the best solution for you is to create a structure for Modules/Plugins where you set a pattern of use and you will make your application understand these modules created following the specifications above.
With this you allow anyone to be creating or developing models desaclopados their application.
I think this is a good example with your Wordpress plugins. Anyone can create and embed its functionality within the application page, but of course you can make in its API limitations, controlling what you want.

Building a REST API quickly from a Database model

I've designed my database diagram(11 entites) for my prototype application. I need to have an REST API on top of this that will allow me to build a prototype android tablet application that talks to it.
Considering this is only for prototype purposes. What would be the quickest way to get a API up and running that would allow me to get, put, delete etc..
Security at this point isn't an issue so even if all add edit delete were open that would be fine.
My initial idea is to build this with PHP and MySQL maybe using the Yii framework to help but I feel there might be something that might be faster for my purpose.
Any thoughts or recommendations or advice?
It is worth looking into API rapid-prototyping tools like Apify (tutorial) since you're starting from scratch. If you're planning to have both an API and a Web site accessing the same data, consider using one framework for both as it helps prevent duplicating logic. CakePHP and Yii are good examples of multipurpose frameworks that are suited for this type of development.
If Python is an option, it is trivial to use a light-weight http framework to build a REST API that accesses a database.
Here's a snippet for a fully functioning http server using the itty framework: https://github.com/toastdriven/itty/blob/master/examples/web_service.py and https://github.com/toastdriven/itty/blob/master/examples/posting_data.py
Look at this project which allows you to create an API REST in seconds.
https://github.com/GeekyTheory/Automatic-API-REST
Features
Creation a powerful API REST of your MySQL Data Base in Seconds.
Management of the API in situ, it is not neccesary an extra data base.
Private tables and fields.
Custom queries.
Installation
Clone the repo.
git clone https://github.com/GeekyTheory/Automatic-API-REST/
Place it in your web folder /var/www/YourWebPage/
Open the file config.php and complete all the fields with the server credencials.
Go to domain.com/AutomaticaApiRest

Is it possible to integrate user databases between Drupal and an ASP&SQL Server platform?

We have a game project designed on ASP&SQL Server, and we need to integrate it's user database with Drupal.
This would be easier from Project to Drupal (since there is user_save and user_delete functions available globally by using drupal bootstrap) but I'm not sure if we can execute PHP functions on an ASP platform.
Is there any documentation for this kind of problems? What do you suggest?
First of all, I think you should rethink your strategy. Why did you choose ASP & MSSQL and why did you choose Drupal?
But if you really want to stick with it I guess by far the easiest way would be to write a PHP (SOAP) webservice that can be used to interact with Drupal (ie. add/delete users) using the Drupal API, and call this from your ASP code.
****edit****
You could use the SOAP Server and Services modules of Drupal. Or just write a plain and simple webservice from scratch using the PHP soap classes.
If you're just looking to use the games user database for authentication I know Drupal has a few modules that allow for authentication via external services. I believe basic or digest HTTP is pretty straightforward but it probably wouldn't be too difficult to write a services layer on the ASP app. Check out Drupal's "user access/authentication" section for ideas on external authentication.
you can build your own drupal module and build an api that exposes everything you want to do, im pretty sure asp.net has a lib or something should be out there to build a simple xml-rpc, rest client, avoid soap, you will add an extra layer that you dont really need

Categories