I am designing my System API using RAML 1.0 in Anypoint Design Center. Unfortunately, the RAML Library that got auto-generated using js2dt convertor from the response schema of my third party(system) is as huge as 1,45,000 lines. I have tried splitting up the library into multiple datatypes and referencing back in the library, but it didn't help either. When I publish this as a fragment to Exchange, and try to consume from my actual API Specification RAML, my Design Center is causing a lot of issues like.. the spinner on the top right corner just keeps spinning, the page crashes, the "Try me" doesn't appear. I am pretty sure this is because the design center is not able to handle this huge RAML fragment. When I try using a simple RQ/RS, it just works fine.
I am looking here for help on how to handle this situation.
How to handle such huge RQ/RS in RAML ?
How to improve the performance of design center ?
How to turn off the preview in Design Center ?
The best way to do this is to, generate a json schema from the third party model and refer the type as schema in the RAML. That was light weight and worked like a charm.
Related
I'm looking for a way to send data from processing to a web browser, specifically, I'm looking for a way to send data to Three.js and display it visually, but I'm a little stumped at the moment.
There are two main Processing ports in javascript: ProcessingJS and the more recent p5.js.
The p5.js port should be pretty easy to integrate: check out this wiki article on js libraries
It depends on experience and personal preference: you should totally be able to integrate using either of them.
p5.js is plain vanilla javascript so no problem integrating, but you need to be mindful about Processing syntax and the p5.js equivalent.
Processing.js should allow you to keep most of your Processing (java looking) syntax as is, but you'll need to get a reference to the Processing.js sketch from JS to integrate with three.js. Be sure to check Pomax's Guide to Processing.js for more in depth notes and if you're using the JavaScript mode in the Processing IDE also see the Environment and HTML5 examples.
Update
There's a chance you're simply looking for a way to send data/variables from an existing Processing sketch to the browser, in which case websockets is the way to go. You Processing sketch will also need to become a websocket server (which it can do via a java library), then your three.js webpage would become a websocket client. Check out this answer for more details.
Why not just use Processing to visualize the LEDs? If you are using Processing already for the lighting logic, just visualize it there, no need for a browser or Three.js.
I'm aware that Famous framework does not care about data in the app, and something like AngularJS is the most ideal candidate for the job.
I just want to know how other folks out here are handling data in their apps, specifically POST requests from an external REST API. (since GET calls can be done with the Utility.loadURL() from famo.us itself)
Is AJAX calls the only way to do this right now? (besides Angular/Meteor and the like).
I'm just looking for a clean and simple solution which is easy on beginners like myself.
Appreciate your help.
This might be a better question for the Famo.us Group Mailing List. There are a lot of options that are not tied to just Famo.us also.
So, the answer to your question is there is not a recommended way to call an external API in the Famo.us framework as long as it does not manipulate the DOM directly which could have adverse affects on performance. This is addressed in the Famo.us Gotchas
I am working for a business that deals with auto body shops - we have them subscribed to a service and want to enhance that service by utilizing the Goolge Places API.
I would like to update the places entries by adding or changing specific photos, descriptions and contact info. I realize there is a section of the documentation that deals with adding a 'place report' but I felt this flow was unclear and/or ambiguous.
In other words, what happens when i place this report? Is there a vetting process that only google is involved in? Does this even do what I'm asking it to do? Is this creating a new entry entirely?
Any help on clarification is appreciated. I may have missed the obvious here so if you feel that way let me know with a link please.
The Places Photo service is a read-only API that allows you to easily add high quality photographic content to your application.
https://developers.google.com/places/documentation/photos
Did you not understand the 'read-only' part?
I was going through this PDF (http://nethands.de/download/zenddispatch_en.pdf) that elaborates the detailed workflow of a Zend Framework request.
It seems very confusing to me and so was wondering if someone can be kind enough to list these step by step in simple terms to me?
Many thanks in advance
The steps are simply:
Routing
Dispatch
The PDF looks complicated because it is listing all the places you can hook into this process, along with all the objects that are affected by it. For example with a controller plugin you can write some code that will run just before the routing (routeStartup), and just after routing (routeShutdown). In the PDF you'll see these represented as the green box above and below the red 'Routing' box.
The diagram in the manual is perhaps a little clearer: http://framework.zend.com/manual/en/zend.controller.basics.html
I need to understand a good way to design a web page with dynamically updated graphs. It should be something close to what stock market graphs look like (e.g. Google Finance), although with a bit more complicated functionality, which is not the point. Naturally I am thinking of writing an ajaxy-style flash control, which would communicate with the server through, okay, something like XMLHttpRequest, but from within flash code, and draw things basing on data received. Is this doable with flash? Does security model allow such kind of client-server interaction? If yes, could you think of any references for me to get started (similar opensource projects, articles, whatever)? Or should I forget about flash and use a Java applet right away?
An important thing to note: I don't think I can use Google charting API, because I need also to have user interaction. In the link above to Google Finance the user can drag the graph to and forth with the mouse, that's close to what I need (I will also need to implement some actions from the dropdown menu).
Thanks for your answers and opinions!
Try this: JQuery Flot
Flot is a JQuery plugin to plot graphs. You keep replotting in-place with the latest data at the desired frequency to generate a dynamically updated graph. It is based on the <canvas> tag. We use it successfully to generate pretty complex dynamically updated graphs in our applications. The updates are fetched via periodic AJAX calls.
Another alternative is YUI Charts
We did not explore this a lot but this uses Flash and AJAX like you wanted to do.
/RS
I have used the Google Charts API to do this sort of thing. For a simple example, see my Sunrise and Sunset page. This page calculates sunrise and sunset times for a given latitude and longitude, all in Javascript, then uses the Google Chart API to replace the graph on the page with the requested data.
Update: The Stack Overflow reputation graph (see your user page) isn't Flash and yet allows interactive dragging. (Click and drag on the left to update the posts on the right that reflect the highlighted reputation region.) Perhaps you could look at how that is implemented.
You have described Flex...
This is very possible in flash.
You can use the URLLoader class to obtain data from a server at run time and the draw your graph using a custom control. In actionscript3 you'd subclass the Shape class and write a little drawing code to draw your graphs. Flash has support for drawing and filling so it would probably be very good at this.
The flash client can poll the server for updates. Or if you want a "live" connection you can establish a socket connection to the server and let the server push updated data live. Flash is good for this as you can push XML data over the socket and use the built in support for processing the XML, or you can send binary data just as easily.
As for the security model it's just the standard flash one. You can make network connections back to the server that the swf file came from with no issues. If you want to make a connection to a different server then that server needs to give your client permission to connect to it by hosting a crossdomain.xml file
I'm not sure about the Flash side of things, but this would be pretty simple to do in Silverlight. I am pretty sure you'd easily be able to make a server request in Flash too.
I'd do some searching for long polling.