I'm researching LTI Advantage implementation for my platform built on Laravel and vue js, but I'm having a hard time finding a step-by-step guide on how to implement LTI both as platform and a tool, the official implementation guideline only mention some specification and terms without telling the flow or what I need to provide (endpoint, function or something else) as a LTI Platform
I currently trying to look at what moodle does on handling LTI, but it's so difficult, again, I cannot find how the LTI flow, what data I should save and use, and so on
I've tried https://oat-sa.github.io/doc-lti1p3/ but I am still confused about step-by-step implementation, what should I do as a tool provider, what endpoints need to be provided, and so on.
I see moodle gives a lot of endpoints such as:
mod/lti/token.php (token endpoint)
mod/lti/openid-registration.php (registration endpoint)
mod/lti/certs.php (jwks endpoint)
mod/lti/auth.php (authorization endpoint)
and for LTI registration and launch, moodle has:
(registration url) http://example.com/enrol/lti/register.php?token=xxxx
(tool url) http://example.com/enrol/lti/launch.php
(initiate login) http://example.com/enrol/lti/login.php?id=xxx
(jwks) http://example.com/enrol/lti/jwks.php
(deep linking) http://example.com/enrol/lti/launch_deeplink.php
I don't know what those endpoints do, is it required to run LTI Advantage, and how to make them using that library.
thanks in advance guys for helping me
I have experience from the tool provider side. I would look at using the celtic-project/LTI-PHP library for this. You should be able to import this and get it working with Laravel and vue.
This should have some information on using it as a platform.
https://github.com/celtic-project/LTI-PHP/wiki/Messages
You can view the LTI core specs here:
https://www.imsglobal.org/node/162741
Related
I already tried http://service/?wadl to get a wadl file, but nothing is returned.
I read there isn't really a standard for wadl files in REST (but there is one for SOAP's WSDL), but I thought maybe it would exist and be web-service framework specific to PHP Symfony.
Is there a default wadl url for pulling a list of function signatures?
There would be, if you create it. Symfony does not define URLs for you, it's just a framework.
A Symfony application is not necessarily a REST API application, or even a Web application. It could be a console application, a message consumer, or anything else. It's not a given that "method signature" should be publicly available via any kind of endpoint.
If you want to an endpoint providing some functionality (say, a WADL endpiont, or a WSDL endpoint, or an anything endpoint), you need to provide it by creating and configuring it.
Some libraries built on top of Symfony like Api-Platform or NelmioApiDoc can provide some automatic or semi-automatic documentation for an API built on top of symfony, but how to configure each would depend on one actually using these libraries, and what's one's use-case.
I need integrate the Amadeus API in my Laravel web page, because I can't find how can integrate this, I have learned some documentation for work in PHP, in other cases work in Laravel but no necesary with Amadeus, but with SOAP, I need to do this integration, Could you help me? please!
There is a PHP library to integrate the Amadeus Web Services SOAP interface in a PHP application. It sounds like what you need: https://github.com/amabnl/amadeus-ws-client/
Although this library doesn't provide any ready-made UI or any integration with Laravel, it is a composer package that can be included in any PHP composer-enabled projects easily. It does all the heavy lifting of session handling and creation, sending and receiving of SOAP messages.
I suggest you check it out, start with reading the Getting Started docs: https://github.com/amabnl/amadeus-ws-client/blob/master/docs/about-get-started.rst
If you want to integrate SOAP with your laravel application, you can use this package: https://github.com/artisaninweb/laravel-soap and just follow Amadeus API documentation.
I'm just wondering if there are any good / more reliable framework for server side using Xamarin Forms & Xamarin.Auth.
I was planning to use REST and maybe Lumen , which is a php micro framework but i'm not sure how compatible it is with Xamarin.Auth etc...
Tried to google it but interestingly , came up with nothing .
I basically want to register/sign in users from the app to the server , save their info and make REST api requests based on them.
I'm wondering if anyone had any experience with lumen & xamarin or if there are other better choices that are more compatible .
I've been researching different sites and forums for a proper back-end architecture for my cross-platform app. It's a turned-based game using Xamarin with a dedicated webserver and PHP serving as the application layer.
I recommend checking out this post which has a lot of responses from seasoned pros, be sure to scroll down the thread:
http://forums.xamarin.com/discussion/24549/php-mysql-with-json-and-webrequest
Your approach using REST is solid and appears to be the industry standard for mobile devices to access some type of database. Lumen looks promising given it's a framework designed for building APIs on PHP. OAuth2 is supported on Lumen which is supported by Xamarin.Auth. +1
Here's some good food for the brain:
https://esbenp.github.io/2015/05/26/lumen-web-api-oauth-2-authentication/
https://medium.com/omarelgabrys-blog/building-restful-apis-with-lumen-and-oauth2-8ba279c6a31#.if5nu88p3
You are on the right track. Good luck and Godspeed.
Background:
I am working on a web application, that I plan to launch with iPhone and Android versions in the near future, and I have some questions about developing an API for use by the different front-ends.
I Started with This:
I was reading this TutsPlus tutorial, which talks about creating an API-centric web application, meaning that all of your browser calls and smartphone app calls are routed through the API.
What especially got me excited, was this statement in the tutorial from Twitter:
One of the most important architectural changes is that Twitter.com is now a client of our own API. It fetches data from the same endpoints that the mobile site, our apps for iPhone, iPad, Android, and every third-party application use.
The above statement reflects, what I would ideally like to create.
Then I Saw This:
I found this TutsPlus tutorial, which talks about, how to build a REST API for CodeIgniter. This was good, because I am developing my application in CodeIgniter, using the Modular Extensions plugin - HMVC, and I thought it would be perfect for my purposes.
The only thing, that I'm somewhat lost in, is the way Phil Sturgeon seems to suggest to create the API. He suggests to have all of your front-end code modules completed and then create an API for each of the modules in their respective directories (not necessarily in that order). This would be fine if I didn't want it to be API-centric.
And I Want to Know How to Do This:
How should I proceed to get a blend of both tutorials:
API-centric application that can be used by a browser application as well as separate mobile applications
REST API for CodeIgniter (with HMVC modules)
Should I:
Just follow the API-centric tutorial and try to tailor it to my needs?
Follow the CodeIgniter-specific tutorial and use Phil Sturgeon's advice for how to implement it with HVMC?
A combination of both?
Neither?
Take a look at Eating your own Dogfood by Nick Jackson. These are slides from CICONF 2012 where he details how this all works.
Building your API first is a great idea, then your application can use the API to fetch the data itself. This is of course a little slower as you're adding a HTTP request on data, but locally its not too bad and if you use HMVC to make the request it's even quicker.
In the tutorial I didn't get into HMVC because it's an extra subject, but it can be awesome for adding modular API's. In some simple applications I just make a /api folder like the tutorial suggested but PyroCMS Professional has an API module and a sexy route to allow modular API stuff:
$route['api/([a-zA-Z0-9_-]+)/(:any)'] = '$1/api/$2';
$route['api/([a-zA-Z0-9_-]+)'] = '$1/api/index';
This means I can have a "api.php" controller in every module and still use the /api/controller/method syntax or even /api/controller if you have function index_get().
I would strongly suggest you grab PyroCMS Professional for this feature. Yep you gotta pay, but it handles user key generation, authorisation, logging, etc all out of the box and handles your website too.
I'm writing an iPhone app as a hobby project and it will need a web service to provide it with data. It's not very different from what I do at work, but at work I only write views and controllers. Someone else is responsible for writing the model and usually the clients provide the web service.
I have done some web programming before, back when everyone were using MySQL and PHP, so my skills are a bit outdated, but I'm confident that I would be able to pull it of using the techniques I already know. However, I don't want to waste my time using obsolete tools. I've figured out that the state of the art would be to write a REST API. I was thinking that there should be some pretty good frameworks out there that pretty much just gives you a REST API with CRUD functionality as soon as you've defined a model.
I guess my question is: What would be the fastest way to get a REST API up and running? I really just want to focus on writing the iPhone app and not spend too much time on this API. It would be great if I could get web administration and revision history too. I should also add that the API isn't supposed to be public, so support for authentication would be great as well.
Just to be clear. I wouldn't mind a PHP framework. In fact it could possibly be better since I know that my current hosting supports it.
EDIT:
The links below which apparently were good for 3 years are no longer working so I went and found a couple of new tutorials that I think are going to stick around for a while. These are on the Ray Wenderlich site, a very well respected ios dev tutorial site. The first article actually references the broken links below but it is complete within itself:
How To Write A Simple PHP/MySQL Web Service for an iOS App
and the second one has a little twist to it. It used parse.com on the backend and AFNetworking. Both of which are quite excellent.
How To Synchronize Core Data with a Web Service – Part 1
I have fixed the broken links below by finding the articles in the way back machine. People seem to like the links so I will keep them. The links above should provide more food for thought.
I am doing exactly the same thing with my iphone app. I found this article on building a RESTful API in PHP:
https://web.archive.org/web/20130910164802/http://www.gen-x-design.com/archives/create-a-rest-api-with-php/
and there is also a followup article here:
https://web.archive.org/web/20130323001500/http://www.gen-x-design.com/archives/making-restful-requests-in-php/
with a link to source code at the bottom of the article.
I have programmed a REST API in ZEND Framework using the Zend_Rest_Controller, on the iPhone I used ASIHTTPRequest. My experience with both where good. At the beginning I had some trouble setting up ZEND and connecting it to mySQL, but once I figured out how to do it I was able to write the API very quickly. I can share more information with you if you have any further questions.
EDIT: There seems to be no official documentation on Zend_Rest_Controller. This link describes how to use it to create your API. You simply have to disable rendering in the init() of your subclass and implement the methods for each REST call.
Just to let you know:
I ended up using Ruby on Rails.
EDIT: Since this answer has been downvoted for not providing the reason behind choosing Ruby on Rails and also no instructions on how to write a REST API with it, I thought I would give you my motivation and some simple instructions.
I started reading a book about Ruby on Rails and realized that all I needed to do was to use scaffolding and I got a JSON REST API for free.
Here's a good guide to get you started: http://guides.rubyonrails.org/getting_started.html
When you have your Ruby on Rails environment up and running, creating your REST API isn't harder than running:
$ rails generate scaffold Post name:string title:string content:text
(Example from the above link.) I also found that Rails is very easy and free to deploy to heroku, which meant that I didn't have to pay for hosting for my very basic, low traffic, REST API. There are many other reasons why I am very happy to work with Ruby on Rails, but that's beyond the context of this question.
I followed a quite simple tutorial for creating RESTful APIs with PHP:
Corey Maynard - Creating a RESTful API with PHP
The main concept includes:
one abstract class that handles the parsing of the URI and returning the response, and
one concrete class that consists of just the endpoints for the API.
What about Python?
I'd use Python, Django and Piston.
I'd generate Django models from your
existent DB using inspectdb.
Add the Django admin to your models.
Add Django Piston to your app.
Profit.
With no experience with Python or Django probably it'll take you a day to develop this solution and all code is unit tested and proved to work.
If you want to use PHP I recommend using the CodeIgniter framework with Phil Sturgeon's REST server:
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2
https://github.com/philsturgeon/codeigniter-restserver
Checkout the following PHP class that follows MVC.
http://www.phpclasses.org/package/5080-PHP-Implement-REST-Web-services-servers.html
Hope this helps.
If you already know PHP, there's nothing wrong with a PHP/MySQL backend. You can send all responses in iPhone-compatible plist xml format, and instantly turn the response into a NSDictionary/NSArray/NSNumber data structure with this short snippet of code:
NSString *response = [request responseString];
NSData* plistData = [response dataUsingEncoding:NSUTF8StringEncoding];
NSPropertyListFormat format;
NSString *errorStr;
NSDictionary* plist = [NSPropertyListSerialization propertyListFromData:plistData
mutabilityOption:NSPropertyListImmutable
format:&format
errorDescription:&errorStr];
I also use the ASIHTTP package for forming URLs, sending asynchronous requets, and receiving the responses, I highly recommend it:
http://allseeing-i.com/ASIHTTPRequest/
You should use whatever languages you are comfortable with for the web service. Any language that can formulate REST responses to requests is fine.
That said, if you want to get something running quickly, I suggest using Python on Google App Engine. It's free and you can use Java instead of Python if you so desire. App Engine supports authentication using OpenID and/or Google Accounts (not sure if they're mutually exclusive) so that should make things easier to code.
As far as making the requests on the iOS device, I suggest using ASIHTTPRequest.
Another option is restSQL, an ultra-lightweight persistence framework. See http://restsql.org. It supports MySQL and PostgreSQL and runs in a standard Java EE container, e.g. Apache Tomcat.
restSQL is a very unconventional data access layer. restSQL is not an object-oriented view of the database. It presents flat or hierarchical "views" of relational database tables. These views are query-able and updatable through a simple REST-based HTTP or Java API. The HTTP interface is based on REST principles, which use HTTP’s built-in features, rather than abstracting away from them.
You want a 'REST API with CRUD functionality' and that's exactly restSQL's sweet spot. You could do this with no code. Simply define your SQL Resources via XML files and start doing HTTP calls against them with full CRUD capability.