Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/10/23 in all areas

  1. Good afternoon, dear Delphi developers! I would like to share with you information about our FGX Native product for Delphi, which can be an excellent working tool for you to create cross-platform mobile applications. P.S. I will be happy to answer any of your questions. What is it? FGX Native is a framework developed from scratch, completely independent of FMX/VCL, allowing you to create native mobile cross-platform applications for Android/iOS and using native components provided by operating systems. Key Features: Smooth animation. All visual components have smooth animation. Native view. The components look familiar to the user of the mobile OS(Android и iOS). Support of Right-To-Left languages. Modern approaches in development. Links: Official site: https://fgx-native.com/en/ Customers applications: link For whom? Currently, the world of mobile development is experiencing rapid development. Many services and desktop applications are duplicated in one form or another on mobile devices, and this is not surprising, because according to statistics, about 59% of people in the world own smartphones. This is a huge market that is constantly growing. Unfortunately, mobile development is quite different from desktop development in terms of building a UI. Therefore, in FGX Native, we focused exclusively on the specifics inherent in mobile operating systems and deliberately abandoned support for desktop systems. Our product can be useful both for Delphi developers who just want to enter the world of mobile development, and for those who have ready-made projects created using FMX and are faced with certain limitations of the FMX framework. At the moment, we already have several completed successful translations of projects from FMX to FGX. We are expanding our cooperation with educational institutions and already supply free licenses for computer classes for teaching mobile development with FGX Native. Features FGX Native is built entirely from scratch using only RTL. The delivery includes a rather impressive number of ready-made components for solving problems of different plans. Form Designer The form designer is the cornerstone for convenient visual and really fast mobile app development. The convenience of the designer and the set of visual components depends on how quickly you will be able to add new functionality, make quick visual edits or just check out an idea. Therefore, we have developed our own unique form designer for FGX Native. It offers a large number of features that will definitely accelerate the development of the interface of your future application and make it visual and enjoyable. FlexBox Alignment System The world of mobile devices is characterized by great variability in screen sizes. It is often necessary to use different placement of elements on screens for different orientations and sizes of screens. The classic Delphi alignment system was created in an era when mobile development did not exist in principle, so it is not particularly suitable for these purposes. In FGX Native, we abandoned the classical system in favor of the modern FlexBox, which has already become the de facto standard in various programming languages and layout. As a result, we can make complex, adaptive markup options directly in the designer and, as a rule, without a single line of code. Below are the options for marking up the login and password entry form. As you can see, in portrait and landscape orientations, the form elements are arranged differently. And all this is done by means of the FGX Native designer without a single line of code! List Lists are one of the key components in mobile development. They replace the usual approach with grids, trees, etc. The elements of the list have truly amazing possibilities for customizing the appearance through the use of different styles, which in turn are configured directly in the designer in a way familiar to everyone. It is worth mentioning that the library is supplied with a set of preset styles according to the Material Design concept (https://material.io/components/lists ) which can be selected with one click. Lists support multi-column display mode, dragging and dropping items, and much more. But the most important advantage is that lists maintain smooth operation with thousands and even hundreds of thousands of elements with complex markup due to their internal architecture. Containers A separate part is container components, which are designed to group components and display them in a special way. Among such components, sliding panels for menus. Sliding pages from the bottom, grouping components with scrolling and much more. Camera and barcode scanner One of the applied areas of mobile application development is warehouse accounting. And here you can not do without a barcode scanner. We have already developed it for you. And all you need is to connect the scanner component to the camera. Barcode generator What if you want to generate your barcode. There is nothing easier, the TfgBarcode component allows you to generate a barcode of a popular format. Identification (Facebook, Google Sign In, VK Login, Apple ID) When your customers are working with the application, you may want to simplify the registration and authorization process for them. This will avoid filling out long user registration forms and improve the UX of your application. For this purpose, it is usually suggested to use third-party identification services, such as Facebook Login, Google Sign In, Apple Id and others. In the latest releases of FGX Native, we have added components that allow you to do this. Advertisement If you plan to earn money on your application by placing ads, then we have Google AdMob support for you (Android, iOS will be later). At the same time, you can embed banners with ads in your application or make a full-screen ad. Animation Almost any modern mobile application uses animation to one degree or another to improve the UX. FGX Native offers an API for performing native animation of components. In addition, we have developed ready-made animation templates that you can call with one line of code. And if you want to make complex vector animations, then we have an Airbnb Lottie for you with animation support from Adobe After Effect. Lottie-Demo-Sample.mp4.666bf68c84eed5fb76042e54a385ab9a.mp4 Google Pay and Apple Pay FGX Native supports two payment systems Google Play (Android) and Apple Pay (iOS, at the testing stage). Therefore, if you want to pay for an order in an online store directly in the app, you can also do it. Push-notification Push notifications are used to send client notifications from your server. These are the messages that appear in the notification center of your device. We support two types of push services FireBase (Android) and Apple Push Services (iOS). They are implemented on the basis of RTL System.PushNotification base. However, for our users, we provide a separate component that greatly facilitates the work with push notifications on the side of the mobile application. Digital signature Imagine that you have developed an application for the delivery of goods for couriers. They deliver the goods to the customer and they need to get confirmation from the customer that the order has been delivered. We have developed a component for entering a digital signature. Just let the customer leave a signature on the courier's phone screen. Localization Almost any international application primarily supports more than one interface language. Therefore, the application should be able to translate its interface on the fly in a good way. For these purposes, we supply an extension for the library in the form of a UI localization component. Taking photo And what if you need to take a photo or get a photo from the user's gallery? To do this, we have a special API for getting photos, both in a file and in TfgBitmap from camera or system gallery. Map If mapping services are important to you, then the TfgMap component is included in the library, which allows you to display system maps with the ability to add markers, polylines, lines and etc. Also, for Android, you can even specify your own style for displaying the map. Assets Special attention is paid to optimizing the use of different types of resources: Images, Fonts, Files, Lottie animation and etc. We abandoned the idea of storing resources in dfm and developed our own solution for centralized storage of resources. You can easily add any files, without having to know where the file is physically located and without having to suffer with the Deployment manager. In the same place, you can immediately color the uploaded images and apply the 9-patch effect. Material Design Icons How often have you encountered the need to search for icons for your application? In order not to spend a lot of time searching for suitable standard icons in your application, you can add them from Google Material Icons pack directly from Delphi in a couple of clicks. Image caching One of my favorite features is optimization the use of images in memory. Imagine that you have a regular news application with an endless list of news with a preview image displayed. The mobile device is limited by the size of the available RAM, so it will not be possible to load all the images into memory. The application will simply crash due to lack of memory. To avoid this, the developer usually needs to come up with his own system for uploading/uploading images when it is really needed. In FGX Native, we have already provided for this, and if the image is not used, it will be unloaded from memory automatically and reloaded only when it is really needed. Asynchronous image loading Separately, it is worth noting the task of displaying an image posted on the Internet. A typical way is to place images on the Internet, and dynamically upload them in the application in runtime. With just two lines of code, you can queue an image upload by URL from the network, without thinking about how to output it to the component when it is uploaded. TfgAssetManager.Current.AddBitmapFromUrlAsync('MyImage', 'http://data.fgx-native.com/images/photo-demo.jpg'); fgImage1.ImageName := 'MyImage'; Video Player We also provide video component for playing video from file or from stream. Web Browser If you would like to display web content, you can use WebBrowser component with supporting Basic-Auth, Javascript and SSL error handling. Popup In some cases, you may need to display contextual content. In this case, the Popup implementation is useful. Graphic components A set of primitive components is included in the delivery: rectangle, line, ellipse, circle, SVG Path and etc. They can also be used to build an interface. Canvas For those who do not have enough standard components, you can manually draw graphs or create your own image in the TfgBitmap buffer. Gestures The library supports standard types of gestures (Tap, Double tap, Long tap and Zoom). Standard components Of course, do not forget about the other standard components: buttons, text input fields, date pickers, checkboxes, indicators and much more. Additional tools We also supply a set of auxiliary tools that will be useful in mobile development. Android Log viewer When you are developing Android application, it's quite often, when you need to look at the system log for examination possible issues. Android API Delphi headers generator If you would like to use third-party Java libraries, we have our own tool for generating header files for Java. It is worth noting separately that we have developed our own Android-Delphi bridge, which is more convenient to use than in RTL and offers a number of additional features.
  2. Deviating slightly from the original topic: I wonder when green computing will become a part of education and business, i.e. writing code / designing libs that are less expensive in the context of power consumption.
  3. vfbb

    Skia4Delphi

    Yes! See an example: uses Skia, Skia.FMX {or Skia.Vcl}; procedure SvgStreamToImageStream(const AInputSvgStream, AOutputImageStream: TStream; const AImageWidth, AImageHeight: Integer; const AFormat: TSkEncodedImageFormat = TSkEncodedImageFormat.PNG); var LSurface: ISkSurface; LSvgBrush: TSkSvgBrush; LSvgBytes: TBytes; begin SetLength(LSvgBytes, AInputSvgStream.Size - AInputSvgStream.Position); AInputSvgStream.ReadBuffer(LSvgBytes, Length(LSvgBytes)); LSurface := TSkSurface.MakeRaster(AImageWidth, AImageHeight); LSurface.Canvas.Clear(TAlphaColors.Null); LSvgBrush := TSkSvgBrush.Create; try LSvgBrush.Source := TEncoding.UTF8.GetString(LSvgBytes); LSvgBrush.Render(LSurface.Canvas, RectF(0, 0, AImageWidth, AImageHeight), 1); finally LSvgBrush.Free; end; LSurface.MakeImageSnapshot.EncodeToStream(AOutputImageStream, AFormat); end;
  4. Well in that case you should do what the warning suggests. Add {M+} compiler directive before the class declaration or you can inherit from TPersistent which has RTTI generation turned on. type {$M+} TisEventHandler = class published procedure isPrintScreenClick(Sender: TObject); end;
  5. I have never seen a project fail because someone did not understand some fundamental data structure. However, I've seen plenty fail because they cannot listen to users and document what they said they wanted; because they cannot write clear specs that don't have holes in them; because they can't write code without making assumptions about edge cases because they're afraid to let their boss or client know there's still stuff they're unclear about; and I've seen lots of wasted efforts because even though we implemented exactly what the client asked for, when they saw it actually run, they decided it was totally useless -- because management refused to allow us to get into any kind of dialog with the clients to help clarify their actual use case needs. As a point of fact, very few people I've met who were "self-taught" have ever had any exposure to fundamentals like what we learned in core Computer Science classes. Nonetheless, an increasing number of companies are now hiring people with degrees in English Lit, History, and Psychology, and teaching them how to program. I've been wondering for a while now how relevant the core parts of most CS curricula are since most of it was an outgrowth of an era when both CPU cycles and memory space were far more expensive than programmer time. It's a sad fact that too many programmers with CS degrees will sit down and write a sort routine themselves rather than use a library, mainly because they just don't know what's available in the various libraries they have access to. (In college, we were given bonus points for writing code that had fewer lines and/or took less memory space that the average. We were not rewarded for completing assignments quickly and completely using whatever tools we could find. "Time-to-market" is a very important metric for most companies that rely on software; it's also antithetical to what's taught in most CS programs.) In fact, I'd be far more concerned about a job candidate who didn't know there are generics for all sorts of containers than whether they know how to implement a single- or doubly-linked list in Pascal. Sorry. I don't know how many times someone might think they need to implement a linked-list from scratch; but there have been plenty of times when I was told to do something within a time-frame that would be undoable if I had to rely on core concepts I learned in school rather than specialized libraries that would let me solve the problem in a fraction of the time. So we can agree to disagree on this stuff.
  6. Object references are pointers. That was the whole point and the failure to understand that was the cause of the problem. Apart from that, I agree that most people probably rarely, if ever, use them directly. Sure but it's an important data structure to know. Would you hire a developer who couldn't create a linked list? I know I wouldn't. That really depends on what you do and how you do it. Common? Yes. Most common? Not a chance. I can't remember when I last used a TStringList and I do a lot of string processing and UI stuff. I certainly wouldn't use it to handle CSV files. There's far too much of the format it can't handle properly. While I agree with this, it's not advice I would give a beginner. There are more important things to learn in the beginning and that one will just get in the way of that.
  7. jeroenp

    Unicode weirdness

    Point them to the Problems in different writing systems section of the Wikipedia Mojibake page. Did you really solve them of worked around with the table-based approach? Because if you did that, you are bound to be incomplete. That's a thing many web-tools do. You should reproduce this and report it as an issue to the TMS WEB Core bug category. The classic WordPress editor suffers from the same issue (and a whole lot more issues: search my blog for more), but they marked it as "legacy" while forcing the very a11y* unfriendly (and pretentiously named) Gutenberg editor (which has other issues, but I digress) into peoples face. The WordPress classic editor, trying to be smart, does that too especially when you switch between preview and HTML text modes a few times. The TMS WEB Core might fall in a similar trap. Be sure to report it as bug to the TMS people. --jeroen * a11y: accessibility
  8. There's been very little need for pointers in Delphi after they made it so objects are implicitly passed by reference. People still use them with Record types. As an aside, I've been working with TMS WEB Core a lot lately. It transpiles the Dephi code to javascript, and js doesn't support pointers. So it won't compile Delphi code that uses pointers. Aside from the fact that TTreeNode's have a Data property that's typed as Pointer, I've not had any problem at all. I urge you to learn what's in the RTL and how Generic collections work rather than reinventing the wheel. There are far more interesting problems you can explore besides data structures invented at a time when CPU cycles and memory were very expensive compared to the cost of programmer time. The most commonly used class in Dephi is the TStringlist. It's like the "Swiss Army Knife" of most Delphi programming. Spend time playing with every property it has and get to know it inside and out; I promise you it will be time far better spent than messing with basic data structures. BTW, something not a lot of Dephi programmers know is that a TStringlist can be used to manipulate CSV files directly. You can make them multi-dimensional by hanging them off of the Objects property in a base object. You can also make a wrapper class that defines properties to make it much simpler to access things stuffed into those Objects 'arrays'. When I was learning C++, there was a book, "C++ Idioms" that I referred to a lot to learn different types of common coding idioms and patterns. A lot of them are really OOP patterns that apply in many languages, although many are specific to C++. Spend time learning Delphi programming idioms, especially the different ways of declaring properties and when it's good to access local fields directly rather than setting every property up to use getter and setter methods. And avoid getting into the habit of putting business logic inside of event handlers! Make a separate method that's called if you need to interact with other UI objects as a result of an event being triggered.
  9. jeroenp

    Unicode weirdness

    That would be my first try too. Since could just as well be the odd way the PDF to text on-line exporter makes an encoding error (it wouldn't be the first tool or site doing strange encoding stuff, hence the series of blog posts at https://wiert.me/category/mojibake/ ) and why I mentioned ftfy: it's a great tool helping to figure out encoding issues. Looking at https://ftfy.vercel.app/?s=… (and hoping this forum does not mangle that URL) two encode/decode steps are required to fix, so it does not look like a plain "read using UTF8" solution: s = s.encode('latin-1') s = s.decode('utf-8') s = s.encode('sloppy-windows-1252') s = s.decode('utf-8')
  10. external store accessed via a URI https://github.com/emozgun/delphi-android-SAF
  11. Lars Fosdal

    Migrating projects from Delphi to .Net

    My advise would be to write a few test apps in .NET before you start your migration. Learn how to do databases, files, classes, interfaces, OS and UI. Understand the new paradigms before you try to csharpify Delphi code, so that you know how things work in C# and what you need to change from Delphi. Sadly, UI is still much more work in .NET compared to all the "freebies" in Delphi - and there are several flavours. WinForms, WPF, MAUI, ASP.NET, Blazor. You need to find the one that suits the needs for your app. You will most likely find yourself wanting to acquire some third party UI controls. For any complex Delphi app, you are not looking at a migration, but a rewrite.
×