Noutați

#WEBWONDERS : The browser console is your friend

When writing web client applications with TMS WEB Core, chances are you will be spending quite some time in the browser developer tools. This is the place where you can debug your web client applications and can inspect every detail of your web application: the DOM, source, network, performance, local storage, … in a nutshell a wealth of useful information.  One of the capabilities of the browser developer tools is the console and from your application you can add logging statements to output these in the browser console. The closest comparison with the Windows desktop application development world is the OutputDebugString() command that sends text to a debugger. The direct equivalent is using console.log(“Hello world”) that will do exactly the same but to the browser console. But all similarities end here. The console object that is fully available as Pascal class in a TMS WEB Core web client application has many more options. This object is described here: https://www.w3schools.com/jsref/obj_console.asp Timing functions to measure performance A first convenience of the console object is the ability to time certain parts of your code. You can do this by calling console.time(‘identifier’) to start a browser timer and when the part of the code was executed, call console.timeEnd(‘identifier’) and the browser will output the time difference in the browser console. This example demonstrates the timing of a bubble sort algorithm (for the sake of having some code that takes some time to execute) function BubbleSort( list: TStringList ): TStringList; var i, j: Integer; temp: string; begin // bubble sort for i := 0 to list.Count – 1 do begin for j := 0 to ( list.Count – 1 ) – i do begin if ( j + 1 = list.Count ) then continue; if ( list.Strings[j] > list.Strings[j+1] ) then begin temp := list.Strings[j]; list.Strings[j] := list.Strings[j+1]; list.Strings[j+1] := temp; end; end; end; Result := list; end; function GenerateRandomWord(CONST Len: Integer=16; StartWithVowel: Boolean= FALSE): string; const sVowels: string = ‘AEIOUY’; sConson: string = ‘BCDFGHJKLMNPQRSTVWXZ’; var i: Integer; B: Boolean; begin B := StartWithVowel; SetLength(Result, Len); for i := 1 to len DO begin if B then Result[i] := sVowels[Random(Length(sVowels)) + 1] else Result[i] := sConson[Random(Length(sConson)) + 1]; B:= not B; end; end; procedure TForm1.MeasureTime; var sl: TStringList; i: integer; d: dword; mr: TMyRec; begin console.time(‘bubble’); sl := TStringList.Create; for i := 0 to 2000 do begin sl.Add(generaterandomword(8,false)); end; BubbleSort(sl); console.timeEnd(‘bubble’); sl.Free; end; The result in the browser console looks like: Inspecting values of variables, records, objects The console.log() call can have a variable number of arguments of different types. You can call for example: console.log(‘Date today’,DateToStr(Now)); and this will output today’s date in the console. But also objects or records will be shown with all their details in the console, as this example for a record demonstrates: type TMyRec = record Name: string; Age: integer; Member: boolean; end; var mr: TMyRec; begin mr.Name := ‘Delphi’; mr.Age := 25; mr.Member := true; console.log(mr); end; Or take this example, where the details of a HTML element are displayed in the console, in this example the HTML element used for a TWebEdit:  console.log(WebEdit1.ElementHandle); All these statements combined outputted in the browser console: Formatting output If you thought the browser could only output dull fixed text, you are wrong! On top of that, the console.log() command allows you […]

Read More

Ground-Breaking App For Transgender & Gender-Variant People

‘Twilight People’ is a landmark project that helps users discover and celebrate the hidden history of transgender and gender-variant people of faith in the UK past and present – and it’s written with RAD Studio Delphi and the Firemonkey framework. In the words of the developer: “this collection is the first source of faith and transgender history in Britain. The project explores the narratives around ‘body and ritual’, documenting the interconnection between faith and gender journeys beyond the binary categories of male and female“. Developed by Cheryl Morgan the app contains the stories of some of the many trans people of faith who were interviewed for the project. Website Twilight People Google Play TwilightPeople Screenshot Gallery RAD Studio Delphi enables developers and organizations to further their goals, empower their users and make connections in both business and a social context. Do you have an idea which could be a game-changer for your users? Why not use RAD Studio and the power of Delphi to reach them whatever device they are using on desktop, mobile and the web?

Read More

Understanding RASP, and Putting It to Work

Published May 13, 2021 WRITTEN BY ED TITTEL. Ed Tittel is a long-time IT industry writer and consultant who specializes in matters of networking, security, and Web technologies. For a copy of his resume, a list of publications, his personal blog, and more, please visit www.edtittel.com or follow @EdTittel RASP is an initialism for runtime application self-protection. It’s a technology designed to boost application software security by monitoring inputs to running applications. RASP screens all such inputs, and blocks those that could be associated with potential attacks. RASP also protects various aspects of an applications runtime environment, and prevents changes to environment variables, access controls and privileges, and so forth. Gartner’s IT Glossary defines RASP as follows: “a security technology that is built or linked into an application runtime environment, and is capable of controlling application execution and detecting and preventing real-time attacks.” Numerous security companies offer RASP add-ins for widely used runtime environments, such as the Java Virtual Machine Specification and the .NET Common Language Runtimeli. In fact, developers generally choose to buy RASP tools from such third parties instead of building their own implementations. Putting RASP to Work When integrated into an application’s run-time, RASP incorporates security checks into supporting server environments. That is, RASP intercepts inputs sent to the application for screening, and either allows acceptable inputs or denies questionable or malicious inputs to actually reach the application. RASP also includes built-in logging and monitoring facilities so it can keep track of what it’s doing, and make sure its actions are appropriate and secure. RASP implementations seek to maximize valid interceptions (by preventing malicious or insecure inputs from obtaining application access). At the same time, RASP monitoring — and related updates from its makers — also seeks to avoid invalid interceptions (preventing legal and benign inputs from accessing the application). Ultimately, it makes sense to understand RASP as a validation tool for inputs and data requests made to applications inside their runtime environments. RASP Is An All-Purpose Technology Because it’s a plug-in that works with a range of runtime environments, RASP can handle both web-based and traditional (standalone executable-based) applications. Once present, RASP brings protection and detection capabilities to servers where targeted applications run. In addition, because RASP sees the overall application state and context, it does not work at the packet level as do application firewalls. RASP generally has a nuanced and informed view of application and input states across current ongoing interactions. A stateful view of application inputs gives RASP more scope and flexibility for protection. It can exhibit a variety of behaviors as it detects unwanted actions or malicious inputs that match security rules or policies in its knowledge base. An example of such behaviors, ordered by increasing order of severity, can include: Denial of offending input, with a warning message to the sending user Issue alerts for named recipients when offending inputs occur (usually administrators or security team members) Terminate user session upon offending input Terminate application upon offending input (does not otherwise impact the host server, and other services or applications) RASP implementations generally plug into existing server frameworks and runtime modules. Thus, they integrate with a  program’s code, associated libraries and API calls. Such integration is what gives RASP the ability to handle inputs in real-time as an application is executing. […]

Read More

The Ultimate Productivity Application: My Shift Planner

Most organizations, particularly in the retail and manufacturing sectors once they go beyond a handful of employees, start to introduce shift working arrangements. Shifts can help to make the most efficient use of work time and ensure a continuous production or service availability. The filling and coordination of shifts, however, also introduces some complexities and before long administrators and the employees can begin to struggle a little to keep on top of things. Helping with the shift scheduling workflow My Shift Planner, from UK developers MyBuzz Technologies, is designed for shift workers to help take back control of their work/life balance and help manage when and what their working hours will be. According to the developer, “My Shift Planner is the most powerful Shift Work Calendar app on the market and the easiest to setup and use. Download today to gain back control of your social calendar.” Making admirable use of RAD Studio Delphi to produce cross-platform mobile code MyBuzz have really packed a host of features into My Shift Planner which extract the real benefits of the Firemonkey FMX framework to leverage the user’s mobile device. It’s a superb tool for shift workers. Key Features of My Shift Planner Easy set up. The most common shift schedules are already pre-configured as well as custom set up The shifts synchronize with the mobile device’s calendar. Flexible enough to cope with almost any type of roster. Allows for recording notes as well as actual worked hours and overtime. Contains work reports so that staff can view and check their worksheets. Lets the staff know which day is pay day. Has sharing facilities to share the roster with family and friends. Has built-in, free backup tools.. Google Play My Shift Planner Screenshot Gallery RAD Studio Delphi powers the “My Shift Planner” app – it can power your apps too. Are you ready to join them making great apps? Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy.Start Free Trial   Upgrade Today    Free Delphi Community Edition   Free C++Builder Community Edition

Read More

Developer Stories: Roshan Gerard Bolonna And His MySQL Direct Backup Software

Roshan Gerard Bolonna has been using Delphi since 2005. He has a showcase entry (MySQL Direct Backup) submission in the Delphi 26th Showcase Challenge and he explained more about it through an interview. You can checkout their application through MySQL Direct Backup website. When did you start using RAD Studio Delphi and how long have you been using it? My interest in Delphi started after using the Turbo C++ back in 2005, when developing Win32 applications, and found that Delphi has a lot of features and easy-to-use libraries. What was it like building software before you had RAD Studio Delphi? RAD Studio is extremely rapid application-oriented and provides all the necessary components to fulfill a software requirement compared to most solutions provided in Visual Studio and other software solutions. How did RAD Studio Delphi help you create your showcase application? As I mentioned earlier rad studio is extremely rapid application-oriented, this is my very first mobile application developed while learning Firemonkey for the first time. This really proves RAD studio has really good features to get the work done fast and is easy to learn. What made RAD Studio Delphi stand out from other options? Interesting features and interactive software components that allow to development of applications with minimum coding involvement. What made you happiest about working with RAD Studio Delphi? Native performance & complete support for Win32 API and a huge component library. What have you been able to achieve through using RAD Studio Delphi to create your showcase application? Customer requirements that cannot be fulfilled by other software solutions, such as remote MySQL native direct backup application. What are some future plans for your showcase application? A serial port data monitor based on Delphi using the VCL. Thank you, Roshan! Click the link below to view Roshan’s wonderful showcase entry. Showcase

Read More

The Future Of Javascript App Testing Is Through Automation

As a developer, we understand how hard is to test all possible problems of an application, and always if you make an important change on your project you probably would be afraid if the application will be broken after merging your code to production, right? Not counting a lot of time you have to spend with many of tests, since basic and more complex to make sure that your new version will be running perfectly. To solve this problem let’s know the great Sencha WebTestIt what is a great and powerful tool and totally free to use on your project and have great productivity saving time and avoiding big problems like bugs blowing up for the user. How can I test Javascript Applications automatically? As a first step, download and install the Sencha WebTestIt here. Follow the steps and you will receive an email with the link to download the product. Extract the file and install it on your machine simply following the very easy steps that the installer will show you. All steps to install are here. Once you have Sencha WebTestIt installed, open it and click on New Project button and then give it a name like my-first-test. Finally, you can define the language that you will create your tests. For this post, we will select Java. After that, click on the button Save to create the new project and start working on it. You can learn more about the UI of the product here. It will explain each tab and what it is used for. How easy is to to start a Simple Test Project? For this project, we will be testing the Ext JS Admin Dashboard but running it locally and we will be focused on the Email page, the List component specifically that we created easily based on templates on this post. You can also test any Web Application or Web Site independently of the technology or framework used to create it. How to create Objects with Sencha WebTestIt Click on New Page Object File to store the element selectors to get the component references to access on our test and give it the name EmailListPo.java. How can I simulate User Actions on a Test? Here we are going to create the actions that our automated test will run against our Email List. Let’s create an action to simulate the user clicking on the icon heart to remove the email from favorites and check if the cell on the grid was changed based on the cell red mark that Ext JS uses to identify if the value was changed on that cell then we will understand that the record was updated locally as a  non-favorite message. Follow these steps: Select the EmailListPo file from your project’s pageobjects folder. On tab Elements click on Add element. Give it the name iconHeart On selector, type .x-grid-cell-inner .fa-heart referring to the heart icon in the grid cell Click on close to save the selector Drag iconHeart  into the Code tab after getTitle method to it create a new method with our new element. It will open a context menu, click on Do then Click on element option The UI will create automatically the method to simulate the click on the heart. Save the file. How can I write a Javascript test? Let’s create […]

Read More

Developer Stories: Murod Oripov Shares Insights On His Uzbek Crosswords Application

Murod Oripov has been programming with Delphi since 2003. His application (Uzbek Crosswords) was qualified for the Uzbek Crosswords and we asked him to tell us some more about his Delphi experiences. Go on over to Uzbek Crossword in Google Play to download the application. When did you start using RAD Studio/Delphi and have long have you been using it? I have been using Delphi since 2003 when it was Delphi 6. What was it like building software before you had RAD Studio/Delphi? I used Foxpro, Basic and C/C++ as a beginner. But I met Delphi and it liked me very much. How did RAD Studio/Delphi help you create your showcase application? The Delphi language seems a lot more straight-forward to use than other alternatives to me. Delphi has a lot of components and beautiful graphic capabilities. What made RAD Studio/Delphi stand out from other options? I think RAD Studio is more easy to understand than other IDEs. What made you happiest about working with RAD Studio/Delphi? I liked the experience of using Delphi to write code very much. Especially making Android apps. What have you been able to achieve through using RAD Studio/Delphi to create your showcase application? I realized that I must work hard and continue in that spirit. And I will definitely succeed. What are some future plans for your showcase application? I decided to get to know Delphi much more and to teach school children how they can use it to make simple beautiful graphical apps. Thank you, Murod!  Click the link below to view Murad’s showcase entry. Showcase No matter where you live or where you choose to work, the ease and power of RAD Studio and Delphi is a powerful combination to make your apps become a reality. Are you ready to take your ideas and make them real?

Read More

Easily Build Powerful Interactive Data Visualizations Using D3 And JavaScript

The D3 package in Sencha ExtJS enables you to create interactive data visualization easily. By utilizing it, you can present the data more effectively in your web application. As a result, individuals and companies can easily uncover valuable insights. In this post, you will know the details of creating powerful data visualizations using two components: D3 Pack and D3 Hierarchy. What is D3? D3 (Data Driven Components) is an open-source JavaScript library. It enables you to create interactive data visualizations in web browsers using SVG, HTML5, and CSS. D3 allows you to bind any kind of data to the Document Object Model (DOM) and make the data interactive by applying data-driven transformation effectively. It supports a plethora of APIs. As a result, you can create and implement beautiful data visualization to your web application easily. How can I build Interactive Data Visualization with D3 and Ext JS? The Sencha D3 package is completely integrated with Ext JS. So, you can build interactive data visualization conveniently. Also, you can implement it with your Ext JS web application quickly. There are various component types in the D3 package. But in this tutorial, we will focus on two types of components: D3 Pack and D3 Words. D3 Pack As the name suggests, this component utilizes D3’s pack layout. It enables you to visualize hierarchical data as an enclosure diagram. Here is an example: To create the visualization shown above, you have to follow these steps: 1. First, you have to create the View using these codes: Ext.define(‘KitchenSink.view.d3.Pack’, { extend: ‘Ext.panel.Panel’, xtype: ‘d3-view-pack’, controller: ‘pack’,   requires: [ ‘KitchenSink.view.d3.TreeViewModel’, ‘Ext.d3.hierarchy.Pack’ ],   width: 930, height: 900, layout: ‘fit’,   viewModel: { type: ‘tree’ },   items: { xtype: ‘d3-pack’, padding: 20, bind: { store: ‘{store}’ }, tooltip: { renderer: ‘onTooltip’ } }   }); Here, you are defining the height and width of the visualization. Also, you are binding the data to store. 2. Next, you have to create the Controller. Simply add these codes:Ext.define(‘KitchenSink.view.d3.PackController’, { extend: ‘Ext.app.ViewController’, alias: ‘controller.pack’,   requires: [ ‘Ext.util.Format’ ],   onTooltip: function (component, tooltip, node, element, event) { var size = node.get(‘size’), n = node.childNodes.length;   if (size) { tooltip.setHtml(Ext.util.Format.fileSize(size)); } else { tooltip.setHtml(n + ‘ file’ + (n === 1 ? ” : ‘s’) + ‘ inside.’); } }   }); Here, you are defining the function for specifying the size of the nodes. You can find the demo here. D3 Words With the D3 Words component, you can visualize the frequently used words through a customized word cloud where a parent circles contain the child ones. Here is an example: The visualization reveals the most used words of a novel, called “Treasure Island.” You can create it quickly by simply following these steps: 1. Create the View with these codes: Ext.define(‘KitchenSink.view.d3.Words’, { extend: ‘Ext.panel.Panel’, xtype: ‘d3-view-words’, controller: ‘words’,   requires: [ ‘KitchenSink.view.d3.TreeViewModel’, ‘Ext.d3.hierarchy.Pack’ ],   width: 930, height: 900,   layout: ‘fit’, title: ‘”Treasure Island”‘s most used words’,   items: { xtype: ‘d3-pack’, reference: ‘pack’, padding: 0, nodeText: ‘word’, nodeValue: function (node) { // Instead of using `nodeValue: ‘count’` as a config, // take a qubic root of the ‘count’ to downplay // differences in the relative size of nodes. return Math.pow(node.data.count, 1/3); }, colorAxis: { // For this example, we want all nodes to have […]

Read More

Developer Survey: Which Developer Streamers Do You Follow?

Whether you are watching on YouTube or Twitch there is no denying that online streaming of software development and video games is hot. We put together this survey to find out who your favorite developer streaming personalities are so that we can get to know them and possibly build content with them for you! Let us know in the survey below!

Read More

Data Visualization: 5 Ways To Be An Enterprise-Grade Master!

What is data visualization? Data Visualization is an interdisciplinary field that deals with the graphic representation of data. It is a particularly efficient way of communication when the data is diverse and potentially complex. Visualizing data, whether in charts, graphs, or some other form, is important because it can give meaning to the data for a broader audience. “Visualization gives us a way to parse and understand data so that we can add it to our stories, we can incorporate it into our thinking” says Ellie Fields, Senior Vice President of product development at Tableau. How do I start learning data visualization in Windows? With a plethora of online tools and software packages for Data Visualization available, online classes, and resources to help you hone your skills, the entry barrier for creating compelling Data Visualization is lower than ever before. That means you can become proficient in presenting data visually “without a real background” in computer science, data science, or programming. But with so many options, finding a place to start can be overwhelming. In this tutorial, we’ll introduce you to how to integrate any Python’s Data Visualization libraries with Embarcadero’s Delphi, using Python4Delphi (P4D) to get you started in creating Windows GUI apps. How does Python4Delphi help with data visualization? P4D empowers Python users with Delphi’s award-winning VCL functionalities for Windows which enables us to build native Windows apps 5x faster. This integration enables us to create a modern GUI with Windows 10 looks and responsive controls for our Python Data Visualization applications. Python4Delphi also comes with an extensive range of demos, use cases, and tutorials. How to use Matplotlib, Seaborn, Bokeh, NetworkX, and Plotly Python libraries to perform data visualization tasks All of the libraries we show in this demo can be integrated with Python4Delphi for you to easily create Windows Apps with data visualization capabilities. Prerequisites: Before we begin to work, download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out the easy instructions found in the Getting Started With Python4Delphi video by Jim McKeeth. Time to get started! First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link. Open Demo01.dproj. 1. How do I Visualize Data with Matplotlib in Windows?  Matplotlib is one of the most popular and oldest data visualization libraries in Python which is commonly used in exploratory data analysis and machine learning. In data science and machine learning, Matplotlib helps us to gain insights from a huge amount of data through different data visualization techniques. With the growing demand for data science and analytics skill sets, visualizing data programmatically is one of the most crucial tasks these days. You can easily solve these tasks by combining the Matplotlib library with Python4Delphi (P4D). Matplotlib can be used in Python scripts, in the Python and IPython shell, on web application servers, and various graphical user interface toolkits (in this post, Python GUI by Delphi’s VCL using […]

Read More