Noutați

How to use GraphQL with Ext JS—A Tutorial

TL;DR GraphQL schema and ExtJS data model work together very well. Apollo Client provides a core library that can be included in ExtJS projects to easily manage GraphQL requests, adding powerful features such as in-memory caching. Here I explain a proxy implementation that fully wraps the GraphQL integration, generating requests from ExtJS models (with associations) and their values. The proxy, together with a working example, can be found here. What is GraphQL? GraphQL is a great tool for developers to control the data they need from an API: by introducing schemas, it provides a standard structure for your APIs. It requests you to define object types and fields, unlike the REST APIs that are based on a style convention. The GraphQL structured approach in remote communication allows you to use a lot of productivity tools both in server-side runtime and front-end applications. These include testing, auto-generated documentation, editing and multi-language SDKs. From the client side, the main difference with REST is the ability to send queries to the server, specifying exactly what you need rather than relying on an “unpredictable” route implementation. More about Ext JS ExtJS is a framework for Web and mobile Single Page Applications and it is quite popular for development of reach-data interfaces. It is also a first-class citizen in the front-end technologies in terms of “productivity” and ” schema” and this is the reason why GraphQL is a promising tool for ExtJS data management. At the time of writing, there is no built-in integration for GraphQL queries in the framework, but in this article we’ll  see how to integrate GraphQL in an ExtJS application in order to enable remote communication with a GraphQL back-end and benefit from of all the GraphQL features. Note: an alternative approach can be found using ExtReact taking advantage of Apollo for React integration. Here is the tech talk repo. GraphQL client library When I first introducedGraphQL, I said that one of the advantages are the productivity tools. A production-ready JS library has to be there, and the solutions out there are certainly more than a client SDK. The two options are: I chose Apollo Client because it provides a core library that is framework agnostic rather than Relay which is focused on React use-case. In addition, Apollo is a very popular platform for development of both GraphQL clients and server APIs. GraphQL server Since the implementation of GraphQL server is not in the scope of this how-to article, I  assume you have a working back-end, or you can start a new Apollo Server project from the official tutorial. This is the example schema used for this article. type Query { getUsers( limit: Int offset: Int orderBy: String filter: String ): Users user(id: Int!): User } type Mutation { createUser(createUserInput: CreateUserInput!): Int updateUser( id: Int! updateUserInput: UpdateUserInput! ): Int deleteUser(id: Int!): Int } type User { id: Int! username: String! firstName: String lastName: String role: String! email: String! areas: [Area!] } type Area { id: Int! name: String! } type Users { count: Int! users: [User!]! } input CreateUserInput { username: String! firstName: String! lastName: String! role: String! email: String! areas: [Int!]! } input UpdateUserInput { username: String firstName: String lastName: String role: String email: String areas: [Int!] password: String } ExtJS application setup The test case analysed here is based […]

Read More

Powered By Delphi: A Dynamic Desktop Search Engine Office Document Finder

Office Document Finder is a desktop search engine intended for quick searching and viewing PDF, Word, Excel and PowerPoint documents from application, browser or mobile and it is developed in Delphi. Built using HTML Component Library and HTML Office Library. There are screenshots here from Windows, macOS, and Linux. Great example of a cross-platform Delphi app! Features All formats – Support for all Word (.doc, .docx, .rtf), Excel (.xls, .xlsx), PowerPoint (.ppt, .pptx), Adobe PDF, HTML and EPUB formats Advanced viewer – View documens in its original layout with all pictures and text decoration No dependencies – MS Office and other applications are not required CJK languages – Indexing and searching for documents in Chinese, Japan and Korean languages OCR – Optical text recognition in scanned documents Cloud access – Access your documents from any PC or mobile PDF export – Download PDF file from browser viewer or application Localization – Web and application interface translation to Deutch, French, Russian and Spanish Suggestions – Autocomplete list for every word with number of documents containing this word Themes – Light and dark themes Duplicates – Detection of duplicated documents (displayed as red number) Query language – Support for “starting with”, “exclude word” and “exact words” Screenshot Gallery    

Read More

Welcome: A Spectacular Mobile App For Travelers Made In Delphi

Welcome – Audio walks with a local is a travel application built in Delphi. According to the developer, “Thousands of multi languages audio walks and museum tours in hundreds of cities and museums around the World.” This is an interesting app because it allows you to do some virtual traveling. It supports a number of different languages and the interface looks pretty good. It has mapping, audio, some rich media, and it’s built-in Delphi! Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.Design. Code. Compile. Deploy.Start Free TrialUpgrade Today

Read More

Account Ability: An Impressive Tax Preparation Software Is Delphi Powered

Account Ability is a network ready software application developed in Delphi that fulfills the needs of small to midsize businesses with a simple, yet powerful, solution to the complicated job of annual 1095, 1098, 1099, 3921, 3922, 5498, W2G, W2 and W2c compliance. Payee/Payer copies can be printed on ordinary copy paper, preprinted forms, or written to PDF. Includes electronic filing with IRS and SSA. According to the developer, “The entire database, which can reside on your Local Area Network (LAN), Wide Area Network (WAN), Cloud Server or Desktop Computer, can be shared among select groups or users at your discretion. Account Ability’s Integrated Browser eliminates the need to remember your TCC, EIN, User ID, Password and PIN required by IRS FIRE and SSA Business Services Online (SSA BSO).” The amount of supported forms and features in this tax software for dealing with the United States tax code is staggering.

Read More

Taking the wraps of TMS Web Academy!

We are thrilled to launch the first version of our new platform TMS Web Academy almost on the same day as the 26th anniversary of Delphi. We have been working about 5 months on this new TMS Web Academy platform and now it is ready to take the wraps of it. We invite you to have a look but more precisely to join our welcome webinar we organize today as well as the first ‘real’ webinar planned for Friday 19th about “The making of the TMS Web Academy” platform. See this on our calendar of the events and the possibility to register to participate.  How it all started It will come as no surprise that the covid19 pandemic was instrumental to get the plans rolling to create our TMS Web Academy. Whereas in normal years, TMS software not only participates and gives sessions at numerous Delphi related events across Europe (Foren Tage, SDN conference, Barnsten Delphi seminars in Benelux and France, EKON conference, PasCon, ITDevCon,  …) and our colleague Wagner Landgraf in Brazil but also organized meetups in our office and our annual 2-day Training Days event in Germany, in 2020 there was literally not a single live event that took place.  We received numerous emails from users asking when we would organize something or when we would offer a possibility to come and sit together with our experts to learn about the latest features and techniques we offer in our various products. At the same time, we really missed the interaction with you, the chats between the sessions, your questions and suggestions.  As such, the idea was born to organize webinars, training, communication via an online platform. Why create our own platform? I can imagine the first question will be why to create our own platform for bringing online webinars and training. There are so many ways to collaborate online already, so why reinvent the wheel? Well, there are several reasons. Let me give you a few in no particular order: Eat your own dogfood and show the power of TMS WEB Core Have exactly the kind of interaction wanted for organizing webinars and online training Use a web platform so it can be accessed everywhere and on every device Be totally configurable and extensible to the direction we want to go with it Tight integration with our website and user database Full control over look & feel and branding Offer a platform that is usable by everyone working distributed over the world for TMS Goals First of all, we absolutely do not see the TMS Web Academy as a replacement for live events. I can actually not wait before going again to a live event somewhere in Europe, to have people in meetups at the company or to organize our training days again. At the same time, we do not consider TMS Web Academy as a temporary solution for reaching out to you while the covid19 pandemic lasts. No, the TMS Web Academy will serve as our platform to organize online interactive webinars and training in a much more dynamic way than a physical event can be organized and serve a world-wide audience. Whereas organizing Training Days at a location takes multiple months of preparation, comes with a cost, requires attendees to travel and to allocate these specific […]

Read More

Free webinar: What is coming in TMS BIZ in 2021

Our last blog post, GraphQL, workflow engine, multitenancy and more: what you will do with Delphi in 2021, raised a lot of interest. Due to that, we decided to do a free live webinar to show you in action most of the upcoming features and products, and answer any questions you might have. Register for the free webinar “What is coming in TMS BIZ in 2021”, to happen on Tuesday, February 23, 2021 3:00:00 PM UTC at the TMS Web Academy! Wagner R. Landgraf

Read More

GraphQL, workflow engine, multitenancy and more: what you will do with Delphi in 2021

Here at TMS, we are working on so much new exciting frameworks and features that I decided to share with you what we expect to bring to you in 2021! Photo by Rhett Wesley on Unsplash First, a disclaimer: this is not an official commitment. Some of the things listed here might be delayed or not be released at all. But of course, that’s not our intention, since we are listing it here. We want to (and probably will) release all of this in 2021. But, since unexpected things might happen, we can never guarantee what will happen in future. One second thing: thislist only covers what is coming around TMS Business line of products. There is much more to come from TMS in 2021! I was going to title this post as “TMS Business Roadmap for 2021”. But I thought that the current title brings more attention and curiosity. And it looks like it worked, thanks for coming! ?? Ok, jokes aside, another reason is that we still don’t know if all of the libraries, features and technologies listed here will be part of the TMS Business bundle, and the original title could be misleading. But regardless, everything listed here will for sure be smoothly integrated with TMS Business – either using ORM (TMS Aurelius) or REST/JSON framework (TMS XData), or any other core product, what is for sure is that everything listed here makes up a huge ecosystem around TMS Business technologies. An exciting year is coming ahead! So, without further ado, this is what we expect to bring to Delphi world this year, with TMS Business. GraphQL TMS is bringing GraphQL to Delphi! We have it already in a beta state, the core is complete, all is going fine. We still need to document everything, and add a few more features here and there, but it’s in a very advanced stage. This teaser video shows GraphQL server in action, written in Delphi! The frontend is GraphQL Playground JS framework, but still being served via a Delphi server. The relevant parts of the code used to build the server in the video are the following. First, the GraphQL schema is built: SchemaDocument := TGraphQLDocumentParser.ParseSchema( ‘type Query { hello(name: String!): String }’); Schema := TGraphQLSchemaBuilder.Build(SchemaDocument); Schema.SetResolver(‘Query’, ‘hello’, function(Args: TFieldResolverArgs): TValue begin Result := ‘Hello, ‘ + Args.GetArgument(‘name’).AsString; end ); Then, the endpoints for the GraphQL API and the GraphQL Playground are created: ADispatcher.AddModule( TGraphQLServerModule.Create(‘http://+:2001/tms/graphql’, FSchema)); ADispatcher.AddModule( TGraphQLPlaygroundModule.Create(‘http://+:2001/tms/playground’, ‘/tms/graphql’)); And that’s it for the “Hello, world” demo! TMS Auth A complete framework for adding authentication to your application, with user, roles and permissions management and providing features like login, registration, e-mail confirmation and more. Relying on Aurelius ORM and XData REST framework, with a few lines of code you will get all your database setup and have an authentication API server running, with lots of features. Well, it’s said one picture is worth a thousand words, so here is an example of the available API out of box: And these are screenshots of an existing app built with TMS Web Core which is already using TMS Auth for user registration and login: It will never been as easy to add user and permissions management and login system to your Delphi application and server! BPM Workflow A full workflow engine is […]

Read More

A Timeline of the Solarwinds Hack: What We’ve Learned

Published January 19, 2021 WRITTEN BY THE KIUWAN TEAMExperienced developers, cyber-security experts, ALM consultants, DevOps gurus and some other dangerous species. The SolarWinds hack was a major security breach that affected over 3,000 SolarWinds customers, including major corporations like Cisco, Intel, Cox Communications, and Belkin. Also impacted were multiple US states and government agencies including the US Department of State and the US Department of Homeland Security. The attack, dubbed SUNBURST, involved inserting malicious code into SolarWinds’s Orion Platform software. This code created a backdoor which later was used to access customers’ networks. Experts believe the attack was instigated by hackers based in Russia who may have managed to access sensitive government data. SUNBURST is one of the most sophisticated cyberattacks in history, with malware capable of evading detection. Here’s a timeline of the major events in the SUNBURST attack, followed by recommendations for organizations to protect against supply-chain threats. The Attack Timeline Threat Actor Accesses SolarWinds September 4, 2019: unknown attackers access SolarWinds. September 12, 2019: the hackers inject the test code and perform a trial run. The attackers use a sophisticated injection source to insert the SUNBURST malicious code into the company’s Orion Platform software. The attacker use multiple servers based in the US and mimick legitimate network traffic to circumvent the threat detection used by SolarWinds, its partners, and clients. February 20, 2020: Hackers compile and deploy the SUNBURST attack. This is an updated variant of the malicious code inserted into the Orion Platform released from February 20, 2020, and beyond. June 4, 2020: the perpetrators remove the SUNBURST malicious code from SolarWinds systems. FireEye Discovers SolarWinds Attacks December 8, 2020: FireEye, a cybersecurity threat and intelligence provider, reports that state-sponsored hackers broke into its network and made away with its Red Team penetration testing and assessment tools. The company expresses concern that the hackers would use the stolen tools to target other companies. December 11, 2020: while conducting breach investigations, FireEye discovers that SolarWinds had been attacked. They realize that this was a supply chain hack where the attackers had corrupted and weaponized SolarWinds’ Orion Platform updates. The malicious SUNBURST code had corrupted all the Orion releases made between March and June 2020. December 12, 2020: FireEye informs SolarWinds that the Orion Platform had been compromised through a cyberattack. The news prompts the National Security Council (NSC) to convene a White House meeting to discuss the security breach of several government agencies and enterprises. The News Becomes Public December 13, 2020: The Cybersecurity and Infrastructure Security Agency (CISA) issues an emergency directive requiring federal agencies to disable SolarWinds Orion connections because they pose a substantial security threat. SolarWinds issues a security advisory explaining the Orion Platform hack and the defensive measures clients could use to protect their systems. FireEye discloses that a hacker had used SolarWinds’ supply chain to compromise the networks of several global clients. Microsoft issues guidance explaining how the attack could affect its customers. The attack receives media coverage for the first time. Reuters reports that the hack on SolarWinds Orion may have originated in Russia and could have compromised the systems of several federal agencies. Public Response Begins December 15, 2020: SolarWinds releases a software fix. The media identifies victims that include the Department of Homeland Security (DHS), the State Department, and […]

Read More

Freebie Friday: Windows version info

Coincidence or not, but 26 years ago, in 1995, not only Delphi 1 was released by Borland but Microsoft also released Windows 95 that from that moment on skyrocketed in popularity and went for world domination as operating system.Who would have thought in 1995 that 26 years later, detecting on what Windows operating system your software is running would be more complex than ever?Over the years, Microsoft released not only new major versions almost every 2 to 3 years but also all sorts of editions like the Windows NT operating system for example. In 2015 Microsoft released Windows 10 and decided it would continue to release incremental updates all under the Windows 10 moniker but also here Microsoft went on to make it available in different editions (Education, Home, Pro, Enterprise) and at the same time continued to release major updates to its server operating system Windows 2016 Server and Windows 2019 Server. Needless to say that proper Windows operating system version detection became non-trivial over the years. Added to this complexity is the fact that Microsoft decided to create a mechanism to return Windows version information to applications through its APIs different from the real Windows version and this depending on the application manifest. The reason for this approach was obviously for ensuring old applications would continue to work thinking they were running on older Windows operating systems, but it doesn’t make things easier.  So, forget about all this history, forget about all this complexity as after all, it is Friday today and we are heading to the weekend to celebrate the 26th anniversary of Delphi. This #FreebieFriday brings you one routine GetOperatingSystem() that returns the Windows version and also the version number as string: procedure GetOperatingSystem(var AName: string; var AVersion: string); const SM_SERVERR2 = 89; VER_NT_WORKSTATION = $0000001; type pfnRtlGetVersion = function(var RTL_OSVERSIONINFOEXW): DWORD; stdcall; var osVerInfo: TOSVersionInfoEx; majorVer, minorVer, spmajorVer, spminorVer, buildVer, edition: Cardinal; ver: RTL_OSVERSIONINFOEXW; RtlGetVersion: pfnRtlGetVersion; procedure GetUnmanistedVersion(var majv,minv,buildv: cardinal); begin @RtlGetVersion := GetProcAddress(GetModuleHandle(‘ntdll.dll’), ‘RtlGetVersion’); if Assigned(RtlGetVersion) then begin ZeroMemory(@ver, SizeOf(ver)); ver.dwOSVersionInfoSize := SizeOf(ver); if RtlGetVersion(ver) = 0 then begin majv := ver.dwMajorVersion; minv := ver.dwMinorVersion; buildv := ver.dwBuildNumber; end; end; end; function GetWindows10Edition: string; begin Result := ‘Windows 10’; GetProductInfo(majorVer, minorVer, spmajorVer, spminorVer, edition); case edition and $FF of $62..$65: Result := ‘Windows 10 Home’; $79..$7A: Result := ‘Windows 10 Education’; $46,$04,$48,$1B,$54,$7D,$7E,$81,$82: Result := ‘Windows 10 Enterprise’; $30,$31,$A1,$A2: Result := ‘Windows 10 Pro’; end; end; begin AName := ‘Unknown’; AVersion := ‘0’; // set operating system type flag osVerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfoEx); if GetVersionEx(POSVersionInfo(@osVerInfo)^) then begin majorVer := osVerInfo.dwMajorVersion; minorVer := osVerInfo.dwMinorVersion; buildVer := osVerInfo.dwBuildNumber; AVersion := majorVer.ToString + ‘.’ + minorVer.ToString + ‘.’ + buildVer.ToString; case osVerInfo.dwPlatformId of VER_PLATFORM_WIN32_NT: // Windows NT/2000 begin if majorVer = 17763 then AName := ‘Windows Server 2019’ else AName := ‘Windows Server 2016’; end; end; end else if (majorVer = 6) and (minorVer = 3) then begin if osVerInfo.wProductType = VER_NT_WORKSTATION then AName := ‘Windows 8.1’ else AName := ‘Windows Server 2012R2’ end else if (majorVer = 6) and (minorVer = 4) then begin if osVerInfo.wProductType = VER_NT_WORKSTATION then begin AName := GetWindows10Edition; end else begin if osVerInfo.dwBuildNumber >= 17763 then AName := ‘Windows Server 2019’ else AName := ‘Windows Server 2016’ end; end else if (majorVer = 10) and (minorVer = 0) then begin if osVerInfo.wProductType = VER_NT_WORKSTATION […]

Read More

Planning / Scheduling in FMX

Intro The multi-device, true native app platform The FireMonkey® framework is the app development and runtime platform behind RAD Studio, Delphi and C++Builder. FireMonkey is designed for teams building multi-device, true native apps for Windows, OS X, Android and iOS, and getting them to app stores and enterprises fast. source: https://www.embarcadero.com/products/rad-studio/fm-application-platform FMX (FireMonkey) released in 2011 and shortly after we delivered a first set of components. Today, we want to show you the TTMSFNCPlanner component, a highly configurable planning/scheduling component. Features Below is a list of the most important features the TTMSNCPlanner has to offer. The features are not limited to this list, but this will give you a quick insight on what we offer to be able to view and edit appointments / tasks in FireMonkey. Built-in and customizable inplace and dialog editing Moveable and sizeable items with HTML formatted text and hyperlink detection High performance virtual mode Various display modes: day, month, day period, half day period, multi day, multi month, multi day resource, multi resource day and custom displays Multiple events for all kinds of interactions such as editing, item inserting, updating, moving and sizing Multiple events for custom drawing and customization of default drawing Item hints and time indication helpers Optional overlapping items Touch scrolling and selection Optimized for mobile devices Recurrency support Databinding support via the TTMSFNCPlannerDatabaseAdapter Separate ToolBar Popup PDF Export capabilities Learn More! Want to learn more about what the TTMSFNCPlanner can do? Here is a video that highlights some of the above features through a demo application. Download & Explore! The TTMSFNCPlanner component is part of the TMS FNC UI Pack, which, on top of FMX, also offers the ability to write your code once and target other frameworks (VCL, LCL and WEB). You can download a full featured trial version of the TMS FNC UI Pack and start exploring the capabilities of the TTMSFNCPlanner component. Coming up The TTMSFNCPlanner is the second of a series of components that is covered to empower your FMX (FireMonkey) developments. We started the series with a general overview of the most important components that we have to offer, followed by the TTMSFNCRichEditor. Next up will be the TTMSFNCTreeView component, a highly configurable, high performance tree view with virtual and collection-based modes able to deal with millions of nodes so stay tuned for more!.

Read More