Noutați

Extend TMS WEB Core with JS Libraries with Andrew: Epic JSON Primer (part 1)

For the rest of this document, we’re going to be doing triple the work – showing the JavaScript version (JS), the TMS WEB Core wrapper version (WC), and the Delphi version (PAS) of each scenario, presented as a block of code suitable for inclusion (and tested!) within a TMS WEB Core project, which supports all three of these seamlessly.  If you were working on a part of a project that used only Delphi VCL code, you could use just the PAS code equally well there.  Or if you were working on a part of a project that used pure JavaScript, then the JS code within the asm … end blocks would work just as well in that environment.  We’ll even cover a little bit about moving between these three environments.   To begin with, we’ll need to know how to define variables to reference JSON objects. We’ll also need to know how to supply JSON to them (sometimes referred to as serialization), and how to see what they contain (de serialization). For the sake of simplicity, we’re going to show our work using console.log() which works in both Delphi and JavaScript in our TMS WEB Core environment. Simply substitute with ShowMessage or some other equivalent debugging output if you’re working in any other environment.   But why do we have to define variables at all?  Well, one of the key differences between JavaScript and Delphi is how data types are managed.  Delphi is a strongly-typed language meaning that, at nearly every step, the data type assigned to a variable is known, usually in advance of its being used.  And these data types tend to be rather specific in nature.  A JSON Object is not necessarily interchangable with a JSON Array, for example.  JavaScript, on the other hand, is a weakly-typed (some might even say non-typed) language.  Data types are sort of an afterthought and you can write all kinds of code without having to think about what kind of data is flowing through it.   There are significant trade-offs to both approaches.  JSON is also very closely tied to the JavaScript language itself, and some aspects of the JavaScript language that have evolved over the years have led to significant improvements in using JSON in that environment. The overall result is that the JS code we’ll be showing tends to be very short, sometimes a little cryptic, but often very efficient.  The Delphi equivalents often have to do a little more work to achieve the same thing, but not always less efficiently, as we shall see. Using JS code in TMS WEB Core just involves wrapping it in an asm … block.  We’re not using any other libraries or supporting code to do our work here. The WC variations similarly will work without anything special in terms of the TMS WEB Core environment.  The classes we’ll be using are there by default, collectively referred to as the TJS* classes.  For Delphi though, we do need the extra little step of adding WEBlib.JSON to the uses clause of our project (or Form, etc.).  This brings in the TJSON* classes that we’ll be using. Here then is our sample WebButtonClick procedure that we’ll use in nearly every example that follows.  It will start with whatever JS, WC or PAS variables we need and then contain […]

Read More

Extend TMS WEB Core with JS Libraries with Andrew: Epic JSON Primer (part 2)

20 : Relative Performance. I’ve often heard that while it is possible to use the TJSONObject variant of these approaches (the PAS code we’ve been working so diligently on), it is preferable instead to use the WC variant as it will be better performing.  We’ll put that to the test here in a bit of a contrived example.  Often, readability and re-usability of code is more important than straight-up performance, particularly for difficult code that isn’t executed frequently. But at the same time, situations certainly do come up where a bit of code is executed frequently in a tight loop, and squeezing out every bit of performance is important. procedure TForm1.WebButton1Click(Sender: TObject); var   WC_Object: TJSObject;   PAS_Object: TJSONObject;   ElapsedTime: TDateTime;   i: Integer;   Count: Integer; begin   ElapsedTime := Now;   // JS Create 1,000,000 Objects   asm     var JS_Object = {};     for (var i = 0; i

Read More

Setting the vision for Unity DevOps

Q: Why is Plastic SCM being prioritized over Collaborate going forward? A: Collaborate was never designed to be a fully-featured VCS solution, which Plastic SCM is. The Plastic SCM technology is also a better fit for Unity creators’ needs, since it was designed specifically for real-time 3D, with separate workflows for artists and programmers, and support for handling large files and binaries common to RT3D development.  Q: What’s happening to the versions of Unity Teams bundled into Unity Editor subscription plans? A: Starting May 5, 2022, new subscribers to Unity Pro and Enterprise will no longer receive any allocation of Unity Teams. You can take advantage of Plastic SCM’s cloud edition for version control, which is free for up to three users and 5 GB per month, and then pay as you go pricing. Cloud Build has pay-as-you-go pricing. Q: What are Unity’s current DevOps offerings? A: Currently, there are two separate components, each available for purchase separately – Plastic SCM for version control and Cloud Build for CI/CD. Q: As an existing Cloud Build customer, will my pricing change? A: No, it won’t change. As an existing Cloud Build user, you will continue to have access to your current pricing and capabilities for the foreseeable future and until we move all Unity products to Cloud Build 2.0. You will receive notice 60 days in advance of changes to your account prior to conversion to Cloud Build 2.0. Note that access to larger repositories and increased concurrency limits will be unavailable if you choose to keep the old Cloud Build pricing, along with many of our planned innovations. Q: How does the new Cloud Build pricing work? A: Cloud Build 2.0 pricing is completely metered. You will only pay for what you use. Users are charged for build minutes, based on the platform they are building for. For Windows the price is $0.02/min; for Mac the price is $0.07/min; and it’s $10 per build machine concurrency. Q: Can I use version control in Unity, or do I need a separate client? A: Unity Plastic SCM works in the Unity Editor, and it can also be accessed via a separate desktop client. In supported versions of the Editor, Plastic SCM users  can check-in, check out, lock files, view file history, and even create and switch branches as well as choose to install a seperate desktop client. For former Collaborate users, see this user’s guide to switching to Plastic in Unity. A list of supported versions for the in-Editor experience is available here. Q: Can you use Cloud Build with Plastic SCM? A: When setting up Cloud Build, you can choose to connect to Unity Plastic SCM as your source control. If you previously used Collaborate for this workflow, you will need to take action to connect Cloud Build to Plastic SCM. Follow this video guide here.

Read More

Our biggest e-book yet: 2D game art, animation, and lighting for artists

Unity’s suite of 2D tools provides creators with endless possibilities. This guide unpacks key decisions to tackle at the start of your project, as well as best practices for leveraging Unity’s 2D toolset. It’s specifically tailored to developers and artists with intermediate Unity experience who want to make high-end 2D games, independently or collaboratively with a team. The e-book was written by Jarek Majewski, a professional 2D artist, Unity developer, and creative director of our 2D demo, Dragon Crashers, together with input from several Unity 2D experts, such as Rus Scammell and Andy Touch.

Read More

The Things You Missed From Delphi 27th Anniversary Webinar

Delphi recently celebrated its 27th anniversary and in line with this celebration is a special webinar hosted by Jim McKeeth along with other Embarcadero MVPs like Ian Barker, Kyle Wheeler, David Millington, and Marco Cantu. In connection with this year’s team “Building the Future”, the panel will discuss the future of Delphi and how it continues to shape the future of software development. The video highlights some exciting topics from useful windows app development tools like Skia4Delphi to some useful modules and libraries like Python4Delphi and more. See an introduction to WinUI 3 The webinar will first introduce us to the so-called “Ultimate Delphi eBook bundle” that is composed of useful eBooks to help you master Delphi. These include the Object Pascal Handbook by Marco Cantu, Code Faster in Delphi by Alister Christie, and eBooks by Nick Hodges including the Dependency Injection in Delphi, Coding in Delphi, and More Coding in Delphi. The panel will also discuss the WinUI 3 which is said to be the next generation of Microsoft’s Windows UI library. The video will highlight some of its runtime components, XAML-Based UI Elements, and Event handlers. Learn all about the Skia4Delphi project Ian Barker will also discuss more about the Skia4Delphi, an open-source 2D graphics library that provides common APIs that work across a variety of hardware and software platforms. Barker will revisit his Star Trek-inspired data dashboard that was built using the Skia4Delphi library. It is also interesting to note that Paulo César and Vinícius Felipe Botelho Barbosa, the duo behind Skia4Delphi were announced as Delphi Award Winners for the year 2021. Did you know about the Python Library for Delphi? The webinar will also revisit some familiar topics including the Python4Delphi Library which provides a set of free components that wrap up the Python DLL into Delphi which makes it very easy to use python as a scripting language for Delphi applications. It will also highlight both the Delphi VCL for Python and Delphi FMX for Python modules and the benefits of using two different programming languages in one development environment. To learn more about the future of Delphi, feel free to watch the webinar below.  

Read More

How To Become An Expert At The Best Low Code App Builder

Together, in previous articles here on the Embarcadero blog, we have been learning about low code or no code platforms. We learned how RAD Studio helps increase productivity with its fast time-to-market ecosystem and low code mindset. Helping you get your apps created with you only needing to write the smallest amount of code possible is what RAD Studio Delphi and C+ Builder has always been about right from the first days of their release. If you are not aware of our previous low code articles, check them out! With those, you can learn: What is low code movement Differences in low code tools The position of low code tools in the market Universal platform for building apps with low code Other unique features of RAD Studio development environment And 20 fun facts about low code platforms So, I consider you have already read the previous articles and know about the basics of low code movement. This article will show you the steps or must-dos you should follow to become an expert at the best low code app developer. Are you a Professional or a Citizen Developer? Anyone can use low code tools to build applications based on their idea, and these people are called citizen developers. Professional developers mostly create more reliable, stable and scalable platforms with their engineering knowledge. The exciting part is that, according to a Gartner survey, 66% of low code development platform users are professional developers from the IT department of the enterprise. For instance, developers who build apps with RAD Studio can prototype and design everything with 5x or 10x fast productivity and can extend the application with custom code where you can create a more functional app. I am here telling you that consider what you will do and who you want to become with these tools! For instance, if you love engineering and solving problems by writing/integrating/glueing up things, you should become a RAD Studio Developer. RAD Studio is the ecosystem for developers who love productivity and appreciate its time. RAD Studio’s GUI development environment is one of the greatest among any other development tools. Because of its hundreds of built-in visual and non-visual components, you can develop a working prototype in seconds and work on custom functionalities. Moreover, the data connectivity solutions are the best in class. How to become an expert at the best low code app builder? In order to become an expert in any area, you must be genuinely interested in the subject. To become a RAD Studio Developer, you should learn Delphi or C++ programming languages. Being an expert with RAD Studio is not about learning the whole Delphi or C++ language; it is more about correctly using the things you have. For instance, a tutorial shows how to become an experienced Delphi developer.  After completing these steps, it is better to see how the real-world RAD Studio developers are doing to solve problems. For example, several times a month, there will be workshop events where you can learn how to do things and ask questions from professional developers. Additionally, discover new open-source projects that can improve your development process. How to understand Low Code tools? Last semester while taking the System Analysis class, I learned so much about project planning and analysing the system requirements. In the […]

Read More

Extend TMS WEB Core with JS Libraries with Andrew: jQuery

In previous articles in this series, we’ve covered some big JS libraries like Bootstrap and FontAwesome.  But there’s another important JS library out there.  It can be found lurking under approximately 75% of all websites globally.  It first arrived on the scene more than 15 years ago.  And it is likely to be with us for the foreseeable future, even though its use has started to decline. I’m talking of course about jQuery.  But while you can use Bootstrap and FontAwesome in your TMS WEB Core projects without needing to resort to JavaScript coding, the same cannot really be said for jQuery.  At its core, jQuery can be thought of as a kind of extension of sorts to the JavaScript language.  Their motto is Write Less, Do More. We’ll be taking a look at where jQuery might find a good fit in TMS WEB Core projects, and also some of the unexpected challenges that might arise. Good jQuery First, the briefest of histories.  jQuery first surfaced around 2006.  It was a time when writing JavaScript code meant that you had to be very much aware of the target browser that would be running your code.  Standards of the day were tenuous at best.  And as the saying goes, the great thing about standards is that there are so many to choose from. jQuery offered developers a consistent approach to writing JavaScript (an API, essentially) which meant that you could write code using jQuery that would then work across many browsers.  So naturally it rose quickly in popularity.  In fact, it became so popular, particularly among new developers, that it has been said that some developers struggle to write actual Vanilla JavaScript (aka JavaScript that doesn’t make use of any frameworks like jQuery). Not surprising given how easy it has been to use jQuery when compared to the Vanilla JS equivalents of even just a few years ago.    jQuery has also evolved over the years to keep up with current web trends, and perhaps has even helped drive to some degree the adoption of new browser technologies. Even if some of those technologies ultimately end up removing the need for jQuery in the first place.  Progress, all the same.  And given the almost ubiquitous presence of jQuery, many (previously, most) JS libraries have been built on top of it, further ensuring it has a long life ahead of it.  Last time out, we looked at BigText, one such JS library, with jQuery as its only dependency.  Bootstrap 4 was also dependent on jQuery, but this was removed for Bootstrap 5.  Removing jQuery as a dependency seems to be a bit of a trend of late, perhaps ironically at the same time that many JS libraries are increasingly being released with variants that are specifically tailored to other (competing) JS frameworks.  Less Good jQuery Being around for such a long time, and being actively improved all the while, naturally a good deal of bloat is destined to be part of the mix, as would be the case in any software product.  For some projects, this will be the largest JS library in the project, dwarfing all others and negatively impacting the overall performance of the resulting web application.  While I don’t doubt that this can be a real problem, we also […]

Read More

Special upgrade prices

 Are you keeping up with our latest developments? We know it is hard to keep up with our latest developments, it is going super fast! Best way to stay updated? Of course TMS ALL-ACCESS! To give our customers access to all our latest developments we have created our no-nonsense subscription TMS ALL-ACCESS! Because we want our customers to be able to use all our products with no restrictions or limitations. And when we say ALL we really mean ALL our products we offer now and also all new products we’ll release in the year of the subscription. Moreover, our all-access users are the first to receive the previews and betas of our non-released products! A quick recap In the first quarter of 2022, we already released 3 new products: Get full access with:  Easy plan: All current and new products for 1 price! Easy renewal: Yearly renewal only for 520 EUR! Easy install: all products accessible via TMS Subscription Manager tool Easy support: Full online support center access to all areas Easy up-to-date: Early access to product betas Easy learning: Access to TMS WEB Academy Pleasant user experience Use the TMS Subscription Manager with a single login to get instant access to all products in your TMS ALL-ACCESS subscription. TMS Subscription Manager categorizes the products per technology : VCL, WEB, FMX, BIZ, FNC, DEV, .NET, IntraWeb and LCL. Per product, you get a description, link to the product webpage, info on latest available version and release date, info on your last download version and download date and info on your last product install version and date. You can mark specific TMS products as your favorite products. It allows you to start multiple downloads. Behind the scenes, TMS Subscription Manager keeps a backup of any product versions you have downloaded. Right-click on the downloaded version number cell per product and from the context menu you can see all available versions (if there are any) and activate another version for install. The TMS Subscription Manager keeps you always informed about the validity of your subscription and will guide you to the renewal order upon expiry. From the TMS Subscription Manager there is a comprehensive list of links to interact with us, via email, social media, forums, RSS, Youtube videos … Did you know… … that the renewal price after 1 year is at 70% discount from the new license price, i.e. currently just 520 EUR ?!  So, once you are a TMS ALL-ACCESS subscriber, you’re covered the next years for just this fraction of the price. We wish to offer fair prices to ALL our customers at ANY time! We believe the customer should be able to purchase at an attractive and correct price on the day the customers wants to make the purchase and not the day we want this.  So what are you waiting for? Contact sales for special upgrading pricing for existing customers of other products. Requests are looked at case by case and a best possible offer is made. 

Read More

Interact with your chart data in Delphi

Last week we did a blog on visualizing your own data structure, which showed the capabilities of virtual data, and the little code required to get up and running. Today’s blog is demonstrating how to interact with the chart. When the data is loaded, how do we zoom in, out? How can we get more details about a specific point in the data? Panning Panning is enabled by default, you can pan left to right on the X-Axis. To enable/disable panning, you can use the InteractionOptions.Panning property. Panning is done by moving the finger/mouse from right to left, or left to right. By default, the chart is showing the full range of points, starting at point 1. Dragging from left to right will show points before the zero valuepoint on the chart Dragging from right to left will show points after the last visible  The chart can be reset by using the following code TMSFNCChart1.BeginUpdate; for I := 0 to TMSFNCChart1.Series.Count – 1 do TMSFNCChart1.Series[I].AutoXRange := arEnabled; TMSFNCChart1.EndUpdate; Zooming Zooming in / out is also enabled by default, on the x-range, which means that you can zoom/scale horizontally. This can be done by holding the CTRL key on the keyboard, dragging the mouse / finger left & right or by doing a pinch gesture on iOS/Android. Below are 2 screenshots of the chart in action whilst zooming in and out   The chart can be reset in the same way as with panning. The property to support scale interaction is located under InteractionOptions.ScaleMode which can be set to smHorizontal (default), smVertical (y-values scaling) or smNone. Point Detection The chart exposes a series of events that are triggered when clicking on a point, bar, slice or an item in the legend. For this sample, we want to click on a bar, visualize the value and change the color. The code to do this is shown below. procedure TForm1.TMSFNCBarChart1SerieBarClick(Sender: TObject; APoint: TTMSFNCChartPoint); begin APoint.Color := gcOrange; ShowMessage(‘The point clicked has a value of ‘ + APoint.YValue.ToString); end; v2.0 Our team is working hard on the next version which will include a significant amount of new features and improvements related to data import, look & feel and out of the box experience. Stay tuned for more! Want to explore the capabilities of TMS FNC Chart, go ahead and download it from our product page.

Read More

Amazon Linux 2 support and distro-specific packages for GitLab

GitLab’s Distribution Engineering team has been hard at work getting Amazon Linux 2 distro-specific packages ready in preparation for GitLab’s official support of Amazon Linux 2. Starting with Version 15.0 of GitLab, Amazon Linux 2 is a supported distro and packages are available for both x86 and Graviton ARM architectures. Safely moving forward to Amazon Linux 2 packages from EL7 While Amazon Linux 2 has not been officially supported before 15.0, as a convenience to customers who wanted to use yum and RPM packages to install the EL7 packages, GitLab configured a workaround in our packaging services to direct Amazon Linux 2 yum requests to the EL7 packages. If you’ve been using GitLab’s yum repo registration script, you many not know that you were using EL7 packages and not distro-specific packages. This workaround will be deprecated and requests from Amazon Linux 2 will get the distro-specific packages with the release of GitLab 15.3.0 on August 22, 2022. As a convenience for those of you who have automation that depends directly on this workaround, we wanted to provide you with information on how to do early testing as well as how to peg your automation to the EL 7 packages until you are able to properly integrate the changes into your automation. GitLab documentation demonstrates how to call our managed yum repository setup scripts by downloading the latest copy and running it directly in the instructions for installing instances and the instructions for installing runners. Any organization using GitLab’s EL 7 packages for Amazon Linux 2 will want to test with – and update to – the distro-specific packages as soon as possible as GitLab will only be testing Amazon Linux 2 with the Amazon Linux 2 specific packages going forward. We also understand that the timing of the testing and migration to these packages must be done in a coordinated cutover so that the package type does not change in your existing stacks without you having made any changes. This can be more important if a GitLab stack has undergone platform qualification for compliance purposes. Amazon Linux 2 specific packages are only available for GitLab 14.9.0 and later. If your automation depends directly on GitLab’s repo configuration script and it is still pegged to a GitLab version prior to 14.9.0 when this change becomes GA, then action must be taken to prevent breaking that automation. We have devised an idempotent two-line script solution that you can put in place now to prevent disruption if you are still on a pre-14.9.0 version at the time the new behavior of script.rpm.sh becomes GA on August 22, 2022 with the release of GitLab 15.3.0. GitLab rake-based backup and restore will continue to work seamlessly across the distro-specific package changes if you have to restore to your Amazon Linux 2 built stack from an EL7 backup. If you are using third-party backup, you may wish to trigger a new backup immediately after transitioning to the new distro packages to avoid the scenario altogether. Amazon Linux 2 packages for building GitLab instances before 15.3.0 The following code inserts two lines of code between those originally outlined in the instructions for installing using RPM packages. The first one (starts with sed) splices in the Amazon Linux 2 yum repo endpoint edits into the repository configuration file […]

Read More