Thursday, 7 April 2016

Wouldn't it be nice?

I've been playing around with a lot of React.JS lately (personally and at work)

Wouldn't it be nice if the default developer "getting started" experience in MapGuide was a little snippet of ES6 or TypeScript like this?


 import * as React from "react";  
 import * as ReactDOM from "react-dom";  
 import { WebLayout } from "mapguide-viewer";  
 
 let agentUrl = "https://mymapguideserver/mapguide/mapagent/mapagent.fcgi";
 let resourceId = "Library://Samples/Sheboygan/Layouts/React.WebLayout";
  
 ReactDOM.render(<WebLayout agentUrl={agentUrl} 
                            resourceId={resourceId} />, document.body);  
   

Or if you're more inclined towards Fusion

 import * as React from "react";  
 import * as ReactDOM from "react-dom";  
 import { FlexibleLayout } from "mapguide-viewer";  
 
 let agentUrl = "https://mymapguideserver/mapguide/mapagent/mapagent.fcgi";
 let resourceId = "Library://Samples/Sheboygan/Layouts/React.ApplicationDefinition";
  
 ReactDOM.render(<FlexibleLayout agentUrl={agentUrl} 
                                 template="Slate"
                                 resourceId={resourceId} />, document.body);  
   

Sadly, this is just a pipe dream at the moment. I don't know what effort it would take to turn this into reality.

No comments: