Electron – Cross Platform Desktop Apps Made Easy (Part 1) #ibmchampion

We are all victims of a revolution where building apps and websites becomes easier every single day.
Electron is definitely a part of this revolution. and in case you still don’t know what is Electron and which apps are using it….

In this part one of a series of blog posts, I want to explain the basics of Electron.

So, what exactly is this Electron thing anyway?

Electron is a framework for creating native applications with all the emerging technologies including JavaScript, HTML and CSS. Basically, Electron takes care of the hard parts so that you can focus on the core of the application and revolutionize its design.

Designed as an open-source framework, Electron combines the best web technologies and is a cross-platform – meaning that it is easily compatible with Mac, Windows and Linux.

It comes with automatic updates, native menus and notifications as well as crash reporting, debugging and profiling.

Electron (formerly known as Atom Shell) is an open-source framework created by Cheng Zhao, and now developed by GitHub.

  • On 11 April in 2013, Electron was started as Atom Shell.
  • On 6 May 2014, Atom and Atom Shell became open-source with MIT license.
  • On 17 April 2015, Atom Shell was renamed to Electron.
  • On 11 May 2016, Electron reached version 1.0.
  • On 20 May 2016, Electron allowed submitting packaged apps to the Mac App Store.
  • On 2 August 2016, Windows Store support for Electron apps was added.

Electron is build on three core components.

Chromium. An open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web. This site contains design documents, architecture overviews, testing information, and more to help you learn to build and work with the Chromium source code.

V8. Google’s open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google, and in Node.js, among others. It implements ECMAScript as specified in ECMA-262, and runs on Windows 7 or later, macOS 10.5+, and Linux systems that use IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

Node.js. A JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

What are some successful applications built with Electron?

Electron is the main GUI framework behind several notable open-source projects including GitHub’s Atom and Microsoft’s Visual Studio Code source code editors, just to name a few. You can find a verbose list of applications built with Electron here.

Also, IBMs Watson Workspace is available as Electron application since mid 2017.  ( Source: DNUG )

Why would I want to build a desktop application in the first place?

Web application development has come so far. It seems weird, right ?

But it turns out, that actually there are a few reasons, why you want to build desktop applications even in 2018.

Here is a couple of the reasons:

The first one is perhaps your application requirements has a need to run in the background. You don‘t want to rely on your browser being up because your browser might crash,  and if your browser crashes, that background application dies.

The other thing is you might require file system access. The things that make browsers so powerful with web applications and so usable is because of the security model in browsers.
You‘re downloading arbitrary code from the internet and you are executing it on your machine. Browsers have to be extremely sandboxed in order to people will trust them. And as a result of that, things like file system access are things that you are completely locked out.

Perhaps your application requirements also require direct API access to something.
If you download a web application, you cannot tell this application to initiate a connection from my browser to some API over there. You can‘t do that.
So, if you need to do this kind of connection, you have to do it from your local machine. This is why we have i.e a POSTMAN application.

Maybe, your application requires access to your hardware. For example, you have a bluetooth card or want to play with Sphero, or you have a smart-card reader. That kind of stuff, you can‘t do from a browser.
You need access to local API that speak to your local hardware in order that you can make those connections.

But why else would you want to write an application that works on the desktop today?

Perhaps you have a requirement for on premises access. It might not make sense to install a web application with a webserver and stuff if a firewall would stop access.

The other reason is you might require binary protocol access. If you need to make a connection to a MySQL database, you need to make those connections using mysql drivers that compile down to C that you can use as a client library.

And the other thing is that some applications just feel right on the desktop. That is why we (all) have installed Slack app on our machines instead of using the web application.

Another this is GAMES. The desktop is still the predominant place to download and run games.

That is why I think that there is still a place for desktop applications; even in the year 2018.

Why would I want to build a desktop application in Electron?

There are some reasons for that , too

One of the things, electron gives you, is that you only have to learn one framework, and what I mean by that is, you just have to learn electrons API.
It is relatively small. And you can reuse all your JS, HTML and CSS that you‘ve been using for all theses years.

If you are on a MAC, you do not have to learn Cocoa, you do not have to learn the Windows APIs and whatever Linux is using these days for the desktop. You do not have to worry about any of that.

You just use Electron, write your code once and run it on Windows, MAC and Linux.

The other thing is , Electron gives you some amazing tight integration. You can do stuff like activating notifications. You have access to the task switcher. You have access to menues, You have access to global shortcuts. You have access to system level events, so you can detect when your computer is going to sleep, when your computer wakes up or your CPU is going nuts and do something about it.

And finally you get a lot of code reuse with electron.

If your application is a companion to a web application, there is a really good chance that you can take some of the assets that you are using in the frontend and with a little bit of work, transport them over to your electron application.

As a bonus, if your backend is running node.js there is also a really good chance that you can take some of the backend code that is running node.js and transplant it into your Electron application.

You can save a lot of time if you already have that companion web application.

There is actually more.

If you write an application in Electron, there is actually a lot of problems that traditional web developers have already solved over the years and you do not have the need to think about it anymore.

You get Chrome dev tools, for free, when you are start developing an Electron application.

The reason for that is that one of Electrons core components is the Chromium engine.
Your application windows are actually Chromium windows.
And this gives you Chrome dev tools within your application and you can debug your code right inside your application.

And Chrome dev tools is pretty much state-of-the-arte when it comes to debug web applications.

And this one, I think, is also important.

The desktop is a new frontier for developers. Especially web developers. Web developers have traditionally been locked out from the entire part of the desktop application development culture.

We now have the tools to take our skills that we have learned all these years and bring them to a completely new place where we have never been before.

In the next part, you will learn more about the structure of an Electron application. I will show you the parts needed to setup a development environment and how to build your first Electron application.

 


SuperNTF – Beta 0.9.4 released

Kevin Pettitt released version 0.9.4 of SuperNTF on OpenNTF.

SuperNTF by Kevin Pettitt

The initial release of SuperNTF is full of goodies. The first thing you will see is the clean navigation framework. Give yourself the “Admin” role and you will see a link to the “Administration” panel, where all sorts of configuration and logging functions are visible.

You should click the “DB Config” item under “Configuration” to change some global database properties. Check out the other configuration options, and note the “code helpers” which build formula syntax for using keyword and other formulas automatically.

I highly recommend keeping soft deletions enabled, as it works VERY well, regardless of how you delete documents (including “cuts”). Also note the mouseover behavior of the trash icon (and several others).

If you write any agents, check out the “Agent Templates” which provide a couple different common agent frameworks. Note that these samples include the standard OpenLog error trapping elements.

The standard “view actions” are highly tuned to show/hide as appropriate. E.g. the “Search” button only shows if the db is full text indexed. Also visible (only on windows) are the excel export actions.

All read and edit activity is tracked, so if you want to know what you looked at yesterday, check the “My History” view. To see what your boss read yesterday, look in the “User Activity” views in the Administration section. You can also see the history of specific field value changes at the document level.

And much more…


Display Statistics for !!HELP!! On The Web

Last week I got a phone call from Richard Hogan of 6w Systems. Richard asked if I would like to add functionality to !!HELP!! to create charts, graphs or even dashboards. Hence I receive a lot of questions about the statistics in !HELP!!, I was glad to hear that 6w Systems offer an easy to use solution to achieve the aim.

ddCharts - Create Charts For !!HELP!!

ddCharts, which is 100% Notes, allows Notes developers & administrators to easily, and quickly, create drill down charts / graphs / dashboards of live Notes data. There is no data export and charts always display the latest data. You can click on a chart to drill down, and even into Notes documents (if enabled).

ddcharts It can be used as a standalone db, or one can use the DDchart object with Lotusscript to create one’s own charts.

To allow ddCharts to chart the information in !!Help!! would only require the creation of one or two views for the !!HELP!! db, and then creating the chart definition documents (these are simply Notes documents in a ddCharts db, and they store the name of the data db, name of view, and chart settings, etc).

ddCharts is neither Open Source nor it is free of charge but a (single server-) license is available at a very fair rate.


Create PDF documents on the fly ?? for Free!

Portable Document Format (PDF) is the de facto standard for the secure and reliable distribution and exchange of electronic documents and forms around the world. CutePDF Writer (formerly CutePDF Printer) is the free version of commercial PDF creation software. CutePDF Writer installs itself as a “printer subsystem”.
This enables virtually any Windows applications (must be able to print) to create professional quality PDF documents – with just a push of a button! CutePDF Writer is Vista-ready!


D Programming Language

D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability.

D Programming Language Sample

D is statically typed, and compiles direct to native code. It’s multiparadigm: supporting imperative, object oriented, and template metaprogramming styles. It’s a member of the C syntax family, and its look and feel is very close to C++’s.


domingo 1.3 – Open Source Java-API für Lotus Notes/Domino

seen at http://www.atnotes.de

Due to the big feedback with many questions, tips, feature-requests and acceptance, we decided to publish a new release 1.3 with answers and fixes to all questions to all previous releases.

This release adds new methods for dealing with attachments, the whole bunch of functions related to full-text search and many other details. It also improves handling and reporting of misconfigurations like incomplete classpath or PATH.

Please read about all further changes here:
http://domingo.sourceforge.net/changes-report.html

Here you can download domingo 1.3:
http://domingo.sourceforge.net/download.html

Best regards
Kurt Riede

beck et al. projects GmbH, München
http://www.bea-projects.de/


Ytria ScanEZ 5 released

Ytria.com released version 5 of its amazing tool ScanEZ. The new version comes with a polished UI and a lot of new functions. One of these functions is “Export To DXL”.
A complete list of new and approved functions will follow later today.

update: You can find the ScanEZ 5.0.1 release notes here


IBM Blog Template – Syntax Highlighter for Lotus Script

How often would we like to insert coloured code in our documents? I know it’s not that important but, first, it looks much nicer and, second, it’s much easy to understand a piece of source code when it is coloured. At least for me.

I played around with the new IBM Blog template. It gives you all you need to start to blog. As you can see in my blog, I sometimes post some code along with my articles. The code is automatically formatted.

Well, how could this be done in the IBM Blog template? First of all, there is no feature that will do the job out of the box. So I googled and found Alex Gorbatchevs “dp.SyntaxHighlighter“.
dp.SyntaxHighlighter is a free JavaScript tool for source code syntax highlighting. The script is meant to help a developer to post code snippets online with ease and without having to worry about applying format.

Here are the steps to inplement syntax highlighting into the IBM Blog template. At the end of this article you’ll find the necessary files in a zip archive. The archive contains shBrushLS.js. This file contains the keywords and classes for Lotus Script along with REGEXP for formatting Single-Line and Multi-Line comments.

Open the IBM Bolg template in Designer and add the .js files to the files section of the template. Add the .css file to the StyleSheet section of the template.

Now open the “HTML Templates” section in the navigation pane of your blog and click “Block Templates”

Add the following lines to the HTMLBottom template document

Syntax Highlighter

and these lines to the HTMLTop template document.

Syntax Highlighter

Do not forget to save the documents 😉

You can now start to post your code. You have to use a TEXTAREA tag as shown in the picture below. For mor informations on how to use the script, please take a look at the doumentation.

Syntax Highlighter

When you now open the article in the web, it should look like this …

Syntax Highlighter

I encountered a few problems when using the textarea tag. It seems that all CRLF are replaced by nothing and the code appears in one single line. So I had to modify the existing Lotus Script code in the DXLiveContentEngine lib of the template.

I added the following code to the “renderBlogItem” function ( starting at line 750 )

	If rtitem.Type=1 Then
		'is rich text
		Set rtitem2=doc.getfirstitem("rt")
		html=rtitem2.GetFormattedText(False,32767)
		' --- added 05.11.2006, Ulrich Krause
		Dim strHTML As String
		strHTML = R5ReplaceSubstring ( Mid$( HTML ,Instr ( HTML,"", Chr$(13))
		html = R5ReplaceSubstring ( HTML, Mid$( HTML ,Instr(HTML,"

Maybe Steve Castledine can have a look at this.

DOWNLOAD sh.zip

Technorati:


USB Drive Letter Manager

USBDLM is a Windows service that gives control over Window’s drive letter assingment for USB drives. Running as service makes it independent of the logged on user’s previleges, so there is no need to give the users the previlege to change drive letters.
It automatically solves conficts between USB drives and network or subst drives of the currently logged on user.
Furthermore you can define new default letters for USB drives and much more.

[USBDLM website]


YTRIA – FREE License Keys for the Summer!

Are you still using the Limited Version of YTRIA tools? Did you ever want to use the Full Version? Now you can (for a limited-time) and at no cost! If you ever wanted to try Ytria tools, then here’s your chance…Take advantage of our limited-time summer offer and use any (or all) of our tools starting right now! This is a limited-time offer, between July 18, 2006 and August 18, 2006 so enjoy our tools and start saving time!

YTRIA - FREE License Keys for the Summer!

Create PDF documents from Lotus Notes with iText

iText is a library that allows you to generate PDF files on the fly.

The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images. The library is especially useful in combination with Java(TM) technology-based Servlets: The look and feel of HTML is browser dependent; with iText and PDF you can control exactly how your servlet’s output will look.

iText requires JDK 1.4. It’s available for free under a multiple license: MPL and LGPL.

[ via SearchDomino ]


Domingo

Domingo is a simple, consistent, object-oriented easy-to-use interface to the Lotus Notes/Domino Java-API.

f you are a Lotus-Script developer and currently learning Java, with domingo you can access Lotus Notes/Domino as easy as with Lotus-Script. Here are some other important reasons:

* No recycling of notes objects needed at all.
* You donot have to recycle any notes objects!
* Just one more time: recycling of all notes objects is completely handled by domingo!
* exception handling is almost not necessary, but optionally possible
* domingo comes with JavaDoc that can be used in-place in your favorite development environment
* Easy access to the Notes client in Java from outside of the Notes client.
* Stable access to Lotus Domino from a J2EE Web-Application server


public class AgentContext extends DAgentBase {
public void main() {
DDocument doc = getDSession().getAgentContext().getDocumentContext();
// do something with the document
doc.save();
}
}

[ via atnotes.de ]


Import Utility for Lotus Notes/Domino

This is a BETA version of the Lotus Notes / Domino Import Utility developed by AGE Computer Consultancy.

  • Specify import field mapping.
  • You can preview data from the import file with the specified field mapping to ensure data will be imported into the correct fields.
  • Options are available for the handling of imported duplicate records.
  • You can create your own customized scripts to be executed before, during and / or after importing.
  • ComputeWithForm can be called after each record is imported if required.
Import Utility for Lotus Notes/Domino