Now Sketches Can be Turned to Code Instantly

Sketch2Code by Microsoft allows to turn sketch into HTML code
29 August 2018   1761

The Microsoft Azure team introduced the Sketch2Code Web tool to convert user interface sketches to HTML codes. Service speeds up the process of developing projects, eliminating the need to manually create markup based on the drawing.

Sketch2Code
Sketch2Code

Sketch2Code works with artificial intelligence. The process of converting a picture into code consists of five steps.

  • First the user uploads an image through the website.
  • A custom vision model predicts what HTML elements are present in the image and their location.
  • A handwritten text recognition service reads the text inside the predicted elements.
  • A layout algorithm uses the spatial information from all the bounding boxes of the predicted elements to generate a grid structure that accommodates all.
  • An HTML generation engine uses all these pieces of information to generate an HTML markup code reflecting the result.

All images, results and grouping information are stored in the BLOB storage. The connecting link between all services is Azure Functions. The tool is developed in collaboration with Kabel and Spike Techniques. Details about Sketch2Code are provided in the GitHub documentation.

Electron 8.0.0 to be Released

The new released is considered major due to the upgrade to the Chromium 80 code base, the Node.js 12.13 platform, and the V8 8.0 engine
06 February 2020   380

The release of the Electron 8.0.0 platform has been prepared, which provides a self-sufficient framework for developing multi-platform user applications, using Chromium, V8 and Node.js. components as a basis. A significant change in the version number is associated with the upgrade to the Chromium 80 code base, the Node.js 12.13 platform, and the V8 8.0 JavaScript engine.

Among the Electron-specific API changes:

  • Provided the ability to check spelling in input forms using the built-in Chrome spellchecker;
  • When exchanging data between processes (IPC), the Structured Clone Algorithm, which is used in the V8 engine to copy complex JavaScript objects, is used. Compared to the previously used data serialization mechanism, the new algorithm is more predictable, fast and functional. When moving large buffers and complex objects, the new algorithm is approximately two times faster with practically unchanged delays in the transmission of small messages;
  • Disabled rendering to the buffer (Offscreen Rendering) is disabled, because when switching to a new release of Chromium there were problems, and the subsystem was left without an accompanying one;
  • New APIs added: app.getApplicationNameForProtocol (url), BrowserWindow.getMediaSourceId (), BrowserWindow.moveAbove (mediaSourceId), session.downloadURL (url), session.addWordToSpellCheckerDictionary, tray.removeBallexava () (worldId, scripts [, userGesture]).

Electron allows you to create any graphical application using browser technology, the logic of which is determined by JavaScript, HTML and CSS, and the functionality can be expanded through the add-on system. Node.js modules are available for developers, as well as an advanced API for creating native dialogs, integrating applications, creating context menus, integrating with the notification output system, window manipulation, and interaction with Chromium subsystems.

Get more at the official blog.

Unlike web applications, Electron-based programs come in the form of self-contained executable files that are not browser-bound. In this case, the developer does not need to worry about porting the application for various platforms, Electron will provide the ability to build for all systems supported in Chromium. Electron also provides tools for organizing the automatic delivery and installation of updates (updates can be delivered either from a separate server or directly from GitHub).

Among the programs built on the basis of the Electron platform, one can mention the Atom editor, the Nylas email client, the tools for working with Git GitKraken, the Wagon analysis and visualization system for SQL queries, the WordPress Desktop blogging system, the WebTorrent Desktop BitTorrent client, as well as the official clients for Services like Skype, Signal, Slack, Basecamp, Twitch, Ghost, Wire, Wrike, Visual Studio Code and Discord. In total, about 850 applications are presented in the Electron software catalog. To simplify the development of new applications, a set of standard demo applications has been prepared, including code examples for solving various problems.