Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 10/18/18 in Posts

  1. PyScripter, an Open Source, freely available Python IDE written in Delphi, has reached 1 million downloads from Sourceforge. This is in addition to many millions of downloads from its earlier home at the now defunct Google Code and an unknown number of downloads from other distribution channels. Historic note: The initial motivation was to build a good scripting solution for Delphi applications. About 20 years ago Microsoft was still promoting ActiveX scripting and Windows Script Engines (such as vbScript and jScript) as the way of building scripting solutions for Windows applications (one of many Microsoft technologies that was all but abandoned). At that time Python was relatively unknown, but it so happened that it was available as a Windows Script Engine and I looked into it. I loved the clean syntax, the expressiveness and conciseness of the language. Other things I liked were duck typing, batteries included, strong object orientation (everything is an object) etc.. The first iteration was an IDE (editor/debugger) for ActiveX Script Engines. But there were many bugs and limitations of Active Scripting both on the Microsoft/Windows side and the Python side. I then came across Python4Delphi which at the time was maintained by a Canadian developer Morgan Martinet. I started contributing to that project and later become its main maintainer, when Morgan's interested shifted to other things. I also developed a simple Python IDE which was named PyScripter and was originally distributed alongside Python4Delphi. There was very few Python IDEs available at the time and somehow the project became known in the Python community and instantly popular. For me, developing PyScripter was just a hobby, but I received a lot of encouragement and kept on improving it. I was also making some income from donations and Google AdSense. Both PyScripter and Python4Delphi were later moved to Google Code. Python popularity was steadily increasing and at the peak of PyScripter's popularity around 2010, there were hundreds of thousands of downloads the days following each new release. More recently as we all know Python became one of the most popular programming languages, but at the same time there was strong competition to PyScripter from freely available commercial grade IDE's such as Jetbrains PyCharm and Microsoft's Visual Studio and Visual Studio Code. PyScripter was almost abandoned when Google Code closed down due to my frustration, but after a couple of years of inactivity the project was moved to Github and development resumed. Downloads are available through Sourceforge, since 2016. Through the years PyScripter has kept a large and loyal group of followers. I get many comments along the lines "I have tried VSCode, I have tried PyCharm, but I keep going back to PyScripter". PyScripter is also quite widely used in many Universities for introducing Python to students. And almost 20 years after its first release, PyScripter is still going strong...
  2. Better Translation Manager https://bitbucket.org/anders_melander/better-translation-manager The Better Translation Manager (BTM) is a replacement for the Delphi Translation Manager a.k.a. the Integrated Translation Environment (ITE) and External Translation Manager (ETM). Why is it better? Well, for one thing, it's free but more important; It actually works - unlike the ITE/ETM. Why? The standard Translation Manager that ships with Delphi today was originally an individual product known as the Borland Translation Suite. With Delphi 5 it became a part of the enterprise edition. The Borland Translation Suite showed great promise but unfortunately it never evolved from its roots as an external tool and has always been hampered by severe bugs that made it completely unusable in practice. As a result nobody uses it. This can be witnessed by the plethora of homegrown and commercial alternatives. The great benefit of the standard translation system is that it just works (this is the system itself I'm talking about, not the tools. The tools suck). Apart from the requirement that you must use resourcestrings you don't need to do anything special when writing your code. At run time you just place the compiled resource modules in the same folder as your application and the Delphi Run Time Library automatically takes care of loading and using the translations based on the current Windows user interface language. Anyway, since Embarcadero has now finally admitted that they are never going to fix the Delphi Translation Manager and instead recommend that we find alternative solutions, I decided that it was time I solved this little problem once and for all. The core functionality of the Better Translation Manager was written in two weeks during my summer vacation in Italy 2019. Amazing what you can do with a little pasta! Features Does not require any changes to the source code of the application being translated. Works with the existing standard Delphi localization system. Translates resourcestrings and all strings in forms regardless of any 3rd party components used. Works on compiled application. Source code is never used. Generates localized binary resource modules (resource DLLs). Does not use an external compiler. Can import existing translations from compiled application and resource modules or from XLIFF localization source files (dfn, rcn files). Read and save TMX and TBX translation memory files. Import Translation Memory from TMX (Translation Memory eXchange), TBX (TermBase eXchange), Microsoft Glossary and CSV. Machine Translation using Translation Memory, Microsoft Translation Service or Microsoft Terminology Service. Forms, Components, Types and Values that should be ignored can be specified in a Stop List. Translations are Spell Checked. Validation Rules to catch common translation mistakes. Supports Right To Left (RTL) editing based on translation language. Translation project is stored in a single XML file. Command line interface for use in automated build systems. Fast! Refreshing a large project typically takes less than a second vs. many minutes with the ITE/ETM. Supports all Unicode versions of Delphi (i.e. Delphi 9 and later). Resource modules contain the version resource of the source application. What it doesn't do There's one task that BTM, by design, doesn't attempt to solve: Localizing the placement and size of controls. Since it has been my experience that it is a far better idea to design the user interface in such a way that the layout automatically accommodates changes in font- and text size and shorter/longer texts due to translation, I decided from the start that I would not be supporting localization of size and position of controls. This also relieved me of having to create a run time form designer, supporting 3rd party controls visually (something that nobody so far has managed to find a foolproof solution to) and deciding what individual properties constitutes size/position values. Instead I just localize all string values - and only string values. But wait... There's More! Yup, you not only get this little wonder for free. You get the full source code too. Grab it at the repository linked at top. More details at the repository. Enjoy / Anders Melander
  3. For all who want to try to get the DDevExtensions Delphi IDE plugin to work with Delphi 10.4 can now clone the DDevExtensions git repository. It contains the project files for Delphi 10.2 and 10.3. I'm not able to help with any Delphi 10.4 issues, so you are on your own. GitHub repository: https://github.com/ahausladen/DDevExtensions
  4. While writing Design Patterns with Delphi, I spent quite some time researching existing literature on design patterns implementation in Delphi, design patterns in other languages, other types of patterns, design principles and so on … In case you would like to dig deeper than the book takes you, here is my reading list. Design Patterns Essentials Software design pattern Computer Science Design Patterns The 23 patterns from the GoF Design Patterns with examples in different languages (including Delphi) Gang of Four Design Patterns Reference Sheet Programming principles Design principles and design patterns SOLID Don't Repeat Yourself (DRY) KISS YAGNI (You Ain't Gonna Need It) Software Design Patterns Are Not Goals, They Are Tools I'm Sick Of GoF Design Patterns Software Development AntiPatterns Big Ball of Mud Design Patterns for Humans Spring4D MMX Code Explorer Singleton https://en.wikipedia.org/wiki/Singleton_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Singleton http://www.yanniel.info/2010/10/singleton-pattern-delphi.html https://ibeblog.com/2010/08/18/delphi-singleton-patterns/ https://stackoverflow.com/a/1409672/4997 https://github.com/jimmckeeth/DelphiPatterns/tree/master/Creational.Singleton https://stackoverflow.com/questions/1409593/creating-a-singleton-in-delphi-using-the-new-features-of-d2009-and-d2010 https://sourcemaking.com/design_patterns/singleton https://schellingerhout.github.io/design%20patterns/design-patterns-creational-delphi/ https://github.com/kamranahmedse/design-patterns-for-humans#-singleton Dependency injection https://en.wikipedia.org/wiki/Dependency_injection http://www.nickhodges.com/post/Service-Locator-is-Indeed-an-Anti-pattern.aspx https://softwareengineering.stackexchange.com/questions/135914/why-was-dependency-injection-pattern-not-included-in-the-gang-of-four/135982 https://stackoverflow.com/questions/4176520/what-is-the-difference-between-strategy-pattern-and-dependency-injection Lazy Initialization https://en.wikipedia.org/wiki/Lazy_initialization Object pool https://en.wikipedia.org/wiki/Object_pool_pattern https://sourcemaking.com/design_patterns/object_pool Factory method https://en.wikipedia.org/wiki/Factory_method_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Factory_method https://github.com/jimmckeeth/DelphiPatterns/tree/master/Creational.FactoryMethod https://sourcemaking.com/design_patterns/factory_method https://schellingerhout.github.io/design%20patterns/design-patterns-creational-delphi/ https://github.com/kamranahmedse/design-patterns-for-humans#-factory-method Abstract factory https://en.wikipedia.org/wiki/Abstract_factory_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Abstract_Factory http://www.felix-colibri.com/papers/design_patterns/factory_and_bridge_patterns/factory_and_bridge_patterns.html#abstract_factory_pattern https://github.com/jimmckeeth/DelphiPatterns/tree/master/Creational.AbstractFactory http://www.nickhodges.com/post/Delphi-and-the-Factory-Pattern-Simple-Factory.aspx https://sourcemaking.com/design_patterns/abstract_factory https://schellingerhout.github.io/design%20patterns/design-patterns-creational-delphi/ https://github.com/kamranahmedse/design-patterns-for-humans#-abstract-factory Prototype https://sourcemaking.com/design_patterns/prototype https://schellingerhout.github.io/design%20patterns/design-patterns-creational-delphi/ https://en.wikipedia.org/wiki/Object_copying#Deep_copy https://github.com/kamranahmedse/design-patterns-for-humans#-prototype Builder https://en.wikipedia.org/wiki/Builder_pattern https://github.com/jimmckeeth/DelphiPatterns/tree/master/Creational.Builder https://sourcemaking.com/design_patterns/builder https://schellingerhout.github.io/design%20patterns/design-patterns-creational-delphi/ https://github.com/kamranahmedse/design-patterns-for-humans#-builder Composite https://en.wikipedia.org/wiki/Composite_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Composite https://github.com/jimmckeeth/DelphiPatterns/tree/master/Structural.Composite https://sourcemaking.com/design_patterns/composite https://github.com/kamranahmedse/design-patterns-for-humans#-composite Flyweight https://en.wikipedia.org/wiki/Flyweight_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Flyweight https://sourcemaking.com/design_patterns/flyweight https://github.com/kamranahmedse/design-patterns-for-humans#-flyweight https://en.wikipedia.org/wiki/String_interning Marker interface https://en.wikipedia.org/wiki/Marker_interface_pattern Bridge https://stackoverflow.com/questions/350404/how-do-the-proxy-decorator-adapter-and-bridge-patterns-differ https://en.wikipedia.org/wiki/Bridge_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Bridge https://github.com/jimmckeeth/DelphiPatterns/tree/master/Structural.Bridge https://sourcemaking.com/design_patterns/bridge http://www.felix-colibri.com/papers/design_patterns/factory_and_bridge_patterns/factory_and_bridge_patterns.html#the_bridge_design_pattern https://simpleprogrammer.com/design-patterns-simplified-the-bridge-pattern/ https://github.com/kamranahmedse/design-patterns-for-humans#-bridge https://stackoverflow.com/q/319728/4997 Adapter https://en.wikipedia.org/wiki/Adapter_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Adapter https://github.com/jimmckeeth/DelphiPatterns/tree/master/Structural.Adapter https://sourcemaking.com/design_patterns/adapter https://github.com/kamranahmedse/design-patterns-for-humans#-adapter Proxy https://en.wikipedia.org/wiki/Proxy_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Proxy https://github.com/jimmckeeth/DelphiPatterns/tree/master/Structural.Proxy https://sourcemaking.com/design_patterns/proxy https://github.com/kamranahmedse/design-patterns-for-humans#-proxy Decorator https://en.wikipedia.org/wiki/Decorator_pattern https://github.com/jimmckeeth/DelphiPatterns/tree/master/Structural.Decorator https://sourcemaking.com/design_patterns/decorator https://github.com/kamranahmedse/design-patterns-for-humans#-decorator Facade https://en.wikipedia.org/wiki/Facade_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Facade https://github.com/jimmckeeth/DelphiPatterns/tree/master/Structural.Facade https://sourcemaking.com/design_patterns/facade https://github.com/kamranahmedse/design-patterns-for-humans#-facade Null object https://en.wikipedia.org/wiki/Null_object_pattern https://sourcemaking.com/design_patterns/null_object Template method https://en.wikipedia.org/wiki/Template_method_pattern https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.TemplateMethod https://www.codeproject.com/Articles/516094/TemplateplusMethodplusDesignplusPatternplusinplusD https://sourcemaking.com/design_patterns/template_method https://github.com/kamranahmedse/design-patterns-for-humans#-template-method Command https://en.wikipedia.org/wiki/Command_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Command https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.Command https://sourcemaking.com/design_patterns/command https://github.com/kamranahmedse/design-patterns-for-humans#-command https://stackoverflow.com/q/6064116/4997 State https://en.wikipedia.org/wiki/State_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/State https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.State https://sourcemaking.com/design_patterns/state https://sourcemaking.com/design_patterns/state/delphi https://github.com/kamranahmedse/design-patterns-for-humans#-state https://en.wikipedia.org/wiki/Finite-state_machine Iterator https://en.wikipedia.org/wiki/Iterator_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Iterator https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.Iterator https://sourcemaking.com/design_patterns/iterator https://github.com/kamranahmedse/design-patterns-for-humans#-iterator http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Declarations_and_Statements_(Delphi)#For_Statements Visitor https://en.wikipedia.org/wiki/Visitor_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Visitor https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.Visitor https://sourcemaking.com/design_patterns/visitor https://sourcemaking.com/design_patterns/visitor/delphi https://github.com/kamranahmedse/design-patterns-for-humans#-visitor Observer https://en.wikipedia.org/wiki/Observer_pattern https://en.wikipedia.org/wiki/Publish–subscribe_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Observer https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.Observer https://github.com/spinettaro/delphi-event-bus https://sourcemaking.com/design_patterns/observer/delphi https://github.com/kamranahmedse/design-patterns-for-humans#-observer http://docwiki.embarcadero.com/Libraries/en/System.Messaging.TMessageManager http://docwiki.embarcadero.com/RADStudio/en/Using_the_RTL_Cross-Platform_Messaging_Solution http://docwiki.embarcadero.com/RADStudio/en/Sending_and_Receiving_Messages_Using_the_RTL http://docwiki.embarcadero.com/Libraries/en/System.Classes.TComponent.Observers Memento https://en.wikipedia.org/wiki/Memento_pattern https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Memento https://github.com/jimmckeeth/DelphiPatterns/tree/master/Behavioral.Memento https://sourcemaking.com/design_patterns/memento https://github.com/kamranahmedse/design-patterns-for-humans#-memento Lock https://en.wikipedia.org/wiki/Lock_(computer_science) https://en.wikipedia.org/wiki/Spinlock Lock striping https://netjs.blogspot.si/2016/05/lock-striping-in-java-concurrency.html Double-checked locking https://en.wikipedia.org/wiki/Double-checked_locking https://en.wikipedia.org/wiki/Test_and_test-and-set Optimistic locking https://www.javaworld.com/article/2075406/java-web-development/optimistic-locking-pattern-for-ejbs.html https://martinfowler.com/eaaCatalog/optimisticOfflineLock.html https://en.wikipedia.org/wiki/Optimistic_concurrency_control Readers-writer lock https://en.wikipedia.org/wiki/Readers–writer_lock https://docs.microsoft.com/en-us/windows/desktop/sync/slim-reader-writer--srw--locks Thread pool https://en.wikipedia.org/wiki/Thread_pool https://stackoverflow.com/questions/47504201/delphi-ttask-and-tthreadpool Messaging https://en.wikipedia.org/wiki/Message_passing https://en.wikipedia.org/wiki/Message_queue Future https://en.wikipedia.org/wiki/Futures_and_promises Pipeline https://en.wikipedia.org/wiki/Staged_event-driven_architecture Designing Delphi programs https://en.wikipedia.org/wiki/Event-driven_programming http://blong.com/Articles/Actions/Actions.htm https://github.com/andrea-magni/TFrameStand https://martinfowler.com/eaaCatalog/tableModule.html https://stackoverflow.com/questions/433819/table-module-vs-domain-model http://docwiki.embarcadero.com/RADStudio/en/LiveBindings_in_RAD_Studio https://www.embarcadero.com/images/dm/technical-papers/understanding_rad_studio_livebindings.pdf Other kinds of patterns https://en.wikipedia.org/wiki/Exception_handling http://wiki.c2.com/?ExceptionPatterns http://docwiki.embarcadero.com/Libraries/en/System.TObject.Destroy http://www.heaventools.com/eurekalog-exception-logger.htm http://www.madshi.net/madExceptDescription.htm https://github.com/project-jedi/jvcl https://en.wikipedia.org/wiki/Debugging_patterns https://git-scm.com/docs/git-bisect http://www.washi.cs.waseda.ac.jp/wp-content/uploads/2017/03/Woei-Kae-Chen.pdf https://github.com/colinj/Functional https://fsharpforfunandprofit.com/fppatterns/ https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms Books & papers Architectural Patterns, Pethuru Raj, Anupama Raman, Harihara Subramanian Coding in Delphi, Nick Hodges Concurrency with Modern C++, Rainer Grimm Concurrent Patterns and Best Practices, Atul S. Khot Dependency Injection in Delphi, Nick Hodges Design Patterns for Humans, Kamran Ahmed Design Patterns Past and Future, Aleksandar Bulajic Design Patterns - Elements of Reusable Object-Oriented Software, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Dive Into Design Patterns, Alexander Shvets Java Design Patterns, Devendra Singh More Coding in Delphi, Nick Hodges The Null Object Pattern, Bobby Woolf
  5. jbg

    IDE Fix pack for Rio

    A new development snapshot of IDE Fix Pack for 10.3 Rio is available. The Win64 (DCC64) and Android (DCCAARM) compiler patches should now work as excepted. Changes: Added: Support for Delphi 10.3 Rio Added: Fix for TStringList.IndexOfName bug (RSP-21633) Added: Fix for access violoation in the Welcomepage JScript9.dll binding Added: TCustomListBox.ResetContent is skipped if the handle isn't created yet Added: DFM Streaming optimizations Added: FillChar uses Enhanced REP MOVSB/STOSB cpu feature if available for large sizes. Added: Enabled CPU LOCK string assignment optimization for local variables Added: -Oe (experimental optimizations) and -x-cgo compiler option extension (Remove of some unneccessary push/pop operations) Added: Expression Evaluator allows array access to pointers even if the type wasn't declared with {$POINTERMATH ON} Added: New compiler option extensions: -x--compileonly, -x--reslist, -x--depfile, -x--unitstats Added: More performance optimization for the DCC64 compiler Added: TStringBuilder.SetLength optimization [RSP-19178] Added: TStrings.GetDelimitedText optimization Fixed: Packages with duplicate units may not have caused a fatal compiler error. IDEFixPackD103Reg64.7z fastdccD103vDev.7z
  6. Dave Millington (personal)

    ANN: Parnassus Parallel Debugger

    A new IDE plugin aimed at helped debugging multithreaded apps! https://blogs.embarcadero.com/new-ide-plugin-parnassus-parallel-debugger/ The plugin: Displays all thread call stacks next to each other Lets you step over, run, etc a thread by itself, not the whole process Shows CPU usage by thread Editor integration to see where threads are executing, so you can easily see what other threads are in the same area of code and more... This has taken me five years to write! That said, most of that was downtime due to working too much time to spend time on this - this release is the result of working weekends since August. It's version 1, and I plan to add some more features over the next few months.
  7. I have uploaded a new development snapshot for the (upcoming) IDE Fix Pack 6.5 IDE Fix Pack Snapshot Download What's new: Added: (IDE) Fix for RSP-23006: Edit controls in the ObjectInspector aren't clipped by the scrollbar anymore (10.3+) Added: (IDE) The compile progress dialog is updated only every 80 ms now. And if a remote desktop session is detected it is only updated every 250 ms. The IDE compiler runs in the main thread, so every GUI update affects the compilation time. Added: -x--jdbg compiler option extension that creates and attaches a jdbg-file. You don't need a detailed map file (-GD) anymore to create or attach a jdbg-file for the binary file. Attaching the jdbg PE section is done after the linker closed the binary file. -x--jdbg and -x--jdbg=1 create a jdbg-file -x--jdbg=2 attaches the jdbg data to the executable/dll/bpl. Question: "Why is the jdbg file smaller than my old file?" - Answer: "The old file was created with an older version of JclDebug.pas." Added: -x--unitstats compiler option extension outputs unit filenames for units with "unitname in 'filename'" entries. Added: -x-fvs compiler option extension also generates faster interface call stubs for virtual methods that are final or in a sealed class. Added: Package compilation is a lot faster in the linker and cleanup phase. Added: Faster ObjectTextToBinary (DFM) implementation by removing unnecessary string comparisons. This improves the linker's performance when it converts DFMs to resources. Added: Faster map file creation by using a much faster Sort-By-Address implementation and a faster \n to \r\n converter. Added: Faster unitname to unit filename resolving (unitname in 'filename') The compiler used a Byte as hash-value and a single linked list. The code is now replaced by a hash-map with a 32 bit hash-value. Added: Faster compiler inline handling for projects with lots of units. Added: The command line compiler uses a double linked unit list to remove and reorder items faster. The IDE compiler still uses the original single linked list because some other code in the IDE does something with it and I couldn't make it not crash. Added: LoadString cache for compiler error/warning/hint messages. The compiler loads the warning/hint string and then decides not to show it. The cache prevents the compiler from calling LoadString too often. Added: Some PAnsiChar/PWideChar RTL optimizations for the IDE and IDE Fix Pack. Fixed: Compiler option extensions didn't work in dcc*.cfg and project.cfg files. Now you can specify -x-* options also in *.cfg files. Fixed: Don't crash if a 3rdParty tool destroys the Castalia Clipboard Form. Fixed: -x-cgo compiler option extension crashed the 10.3 compiler. Removed: The "Exception catcher" patch for ErrorInsight is no more. It didn't have any functionality.
  8. Original post: https://www.thedelphigeek.com/2019/02/design-patterns-with-delphi-book.html Hurrah, hurray, my third book is here! It’s called Hands-On Design Patterns with Delphi and (just like my first book) I wrote it for Packt Publishing. (The second book was self-published and I expect the fourth one to be, too.) As the name says, “Design Patterns with Delphi” deals with design patterns. It is a bit different from most of design pattern books and websites you will find on the Internet. Case in point A: There are no UML diagrams. I don‘t speak UML. Tried to learn it few times but for some reason the whole concept doesn‘t agree with me. If you like diagrams, don’t fear though. Any book on design patterns - and most websites covering that topic - will gladly show how any design pattern can be diagrammed. That, however, is not important and should not govern your decision to buy the book. More important is case in point B: This book speaks Delphi. All the examples are written in Delphi and language features are used to the full. I also covered few less known Delphi idioms in separate sections. You’ll still be able to follow the discussion even though you may program in a different Pascal dialect. There’s also case in point 😄 Examples make sense. I deeply dislike classical design pattern examples of the “And then we want to write this program for different toolkits and it should also be able to draw circles, not only squares” kind. Euch! I tried to find a good example for each design pattern. Admittedly, I ended with few examples that draw triangles and squares on screen (mostly because some patterns were designed specifically for solving such problems), but most of them are of a more practical nature. This book covers all three classical design pattern categories - Creational patterns, Structural patterns, and Behavioral patterns. It also discusses patterns from the newer Concurrency patterns category. At the end I threw in some borderline-pattern(ish) topics and ended with a discussion of few patterns that cannot be strictly classified as “design” patterns. In this book you’ll find: Chapter 1 An introduction to patterns. Exploration of design principles, design patterns, and idioms. A mention of anti-patterns. A short description of most important design principles. Delphi idioms: creating and destroying objects. Chapter 2 Creation patterns part 1. Singleton. Dependency injection. Lazy initialization. Object pool. Chapter 3 Creation patterns part 2. Factory method, Abstract factory, Prototype, Builder. Delphi idioms: Assign and AssignTo. Chapter 4 Structural patterns part 1. Composite. Flyweight. Marker interface. Bridge. Delphi idioms: comparers and hashers. Chapter 5 Structure patterns part 2. Adapter. Proxy. Decorator. Facade. Delphi idioms: replacing components in runtime. Also: helpers. Chapter 6 Behavioral patterns part 1. Null object. Template method. Command. State. Chapter 7 Behavioral patterns part 2. Iterator. Visitor. Observer. Memento. Delphi idioms: for .. in. Chapter 8 Concurrency patterns part 1. Locking. Lock striping. Double-checked locking. Optimistic locking. Readers-writers lock. Delphi idioms: tasks and threads. Also: bitwise operators. Chapter 9 Concurrency patterns part 2. Thread pool. Messaging. Future. Pipeline. Chapter 10 Writing Delphi programs. Event-driven programming. Actions. LiveBindings. Form inheritance. Frames. Data modules. Chapter 11 Wrapping it up. Exceptions. Debugging. Functional programming. I hope you will like this book and learn a lot from it. I know I did during the nine months I spent writing it. And if you find any bug in the code, let me know so I can correct it in the second release!
  9. Remy Lebeau

    First!

    I'm here!
  10. Anders Melander

    MAP2PDB - Profiling with VTune

    It took me a bit longer than expected to get here but I believe I've finally reached the goal. The following shows VTune profiling a Delphi application, with symbol, line number and source code resolution: Download Get the source here: https://bitbucket.org/anders_melander/map2pdb/ And a precompiled exe here: https://bitbucket.org/anders_melander/map2pdb/downloads/ The source has only been tested with Delphi 10.3 - uses inline vars so it will not compile with older versions. Usage map2pdb - Copyright (c) 2021 Anders Melander Version 2.0 Parses the map file produced by Delphi and writes a PDB file. Usage: map2pdb [options] <map-filename> Options: -v Verbose output -pdb[:<output-filename>] Writes a PDB (default) -yaml[:<output-filename>] Writes an YAML file that can be used with llvm-pdbutil -bind[:<exe-filename>] Patches a Delphi compiled exe file to include a reference to the pdb file -test Works on test data. Ignores the input file Example: Configure your project linker options to output a Detailed map file. Compile the project. Execute map2pdb <map-filename> -bind Profile the application with VTune (or whatever) Known issues The -bind switch must occur after the filename contrary to the usage instructions. PDB files larger than 16Mb are not valid. This is currently by design. 64-bit PE files are not yet supported by the -bind option. As should be evident I decided not to go the DWARF route after all. After using a few days to read the DWARF specification and examine the FPC source I decided that it would be easier to leverage the PDB knowledge I had already acquired. Not that this has been easy. Even though I've been able to use the LLVM PDB implementation and Microsoft's PDB source as a reference LLVM's implementation is incomplete and buggy and the LLVM source is "modern C++" which means that it's close to unreadable in places. Microsoft's source, while written in clean C and guaranteed to be correct, doesn't compile and is poorly commented. Luckily it was nothing a few all-nighters with a disassembler and a hex editor couldn't solve. Enjoy!
  11. pyscripter

    Looking for SVG support in Delphi?

    In an earlier thread I presented an Interface-based access to native Windows (Direct2D) SVG support for Delphi applications. This has now been integrated into the SVGIconImageList components by @Carlo Barazzetta. Carlo is a kind of master of ImageLists (among other things). Have a look at his IconFontsImageList for instance. His SVGIconImageList component was based on the work of Martin Walter who must be a great programmer. His SVG component covered almost every SVG element and was well structured and cleanly written. There were numerous bugs and issues though, which, to a large extent, were fixed over the last few weeks and the code was refactored and optimized. Finally, @Vincent Parrett contributed a virtual version of the Image List, mirroring Delphi's VirtualImageList. So in its current form the component features: An SVGImageCollection component that inherits from Delphi's CustomImageCollection and thus is compatible with VirtualImageList A choice of SVG engines: the pascal one based on Martin's work which is using GDI+ and the native Windows one which is using Direct2D. Other SVG engines can be plugged-in with minimum effort. Excellent design support with a nice and effective SVGImageCollection editor developed by Carlo and the built-in VirtualImageList editor. Support for changing the opacity and color of the SVGs including using GrayScale. If you adopt Material Design for example and you use VCL styles, you can adjust the icon color to the style. Compatibility with older Delphi versions going back to XE6. It is free and open-source Svgs are vastly superior to bitmaps because they are typically tiny text files and scale perfectly. So, you do not need to ship with your application multiple resolutions of your images to match the DPI of the monitors. And there is a vast number of free SVGs to cover most needs. IMHO the combination of SVGImageCollection with Delphi's VirtualImageList is the best available solution (commercial ones included) for building DPI-aware Windows applications. Give it a try.
  12. angusj

    Resource Hacker

    Resource Hacker A resource editor for 32bit and 64bit Windows applications. It's both a resource compiler and a decompiler - enabling viewing and editing of resources in executables (*.exe; *.dll; *.scr; etc) and compiled resource libraries (*.res, *.mui). Resource Hacker also provides many options for compiling and decompiling resources from the command-line. http://www.angusj.com/resourcehacker/ Download: http://www.angusj.com/resourcehacker/reshacker_setup.exe
  13. Yaron

    My open-source portfolio

    I released quite a bit of interesting code to github over the years: YouTube DATA API v3 parsing: https://github.com/bLightZP/Delphi-YouTube-Channel-parsing-plugin-for-Zoom-Player Basic RSS feed parsing code: https://github.com/bLightZP/Delphi-RSS-feed-parsing-plugin-for-Zoom-Player TheAudioDB MetaData/Image scraping code: https://github.com/bLightZP/Delphi-theaudiodb.com-Zoom-Player-media-scraping-plug-in TheMovieDB MetaData/Image scraping code: https://github.com/bLightZP/Delphi-themoviedb.org-Zoom-Player-media-scraping-plug-in OpenSubtitles.org subtitle search & scrape code: https://github.com/bLightZP/Delphi-OpenSubtitles.org-API-support-for-Zoom-Player A basic cross-platform calculator https://github.com/bLightZP/ElegantCalculator https://play.google.com/store/apps/details?id=com.inmatrix.ElegantCalculator Adapted old code to work as cross-platform pure-pascal image scaling with filters (bicubic, bilinear, etc): https://github.com/bLightZP/ImageInterpolation Adapted old code to work as a cross-platform drawing of an anti-aliased circle (can be modified to draw rount-rect as well): https://github.com/bLightZP/AntiAliasedCircle I forked a QRCode generating source code and greatly optimized it (~ x50 faster): https://github.com/bLightZP/DelphiZXingQRCode The original Delphi scanline color-conversion implementation was very slow, so I optimized it: https://github.com/bLightZP/OptimizedDelphiFMXScanline
  14. Hi all, I just wanted to let you know my (long-awaited) FMX book is now available (actually it is rolling out on Packt and Amazon so availability may be different across different countries). If you like to read some details you can read my latest blog post: https://blog.andreamagni.eu/2020/10/book-delphi-gui-programming-with-firemonkey-now-available/ I really hope the book will be useful to spread Delphi and FMX as development platform. Thanks for the attention, Andrea
  15. The DDevExtensions 2.85 and the DFMCheck 1.6 are now available for Delphi 10.3 Rio. DDevExtensions Changelog Added: Support for Delphi 10.3 Rio Added: Use Unit dialog option “Every unit on a single line” Improved: UnitSelector Dialog in Delphi 2009 opens much faster Fixed: Structure-View search dropdown had a max height of 2 items Downloads
  16. Dalija Prasnikar

    VCL and VCL styles - bugs and future

    To avoid flooding another thread with unrelated posts about VCL quality and bugs, I have opened this topic for discussion about VCL in general and VCL Styles. First, I would like to respond to comment made by @Attila Kovacs VCL is not abandoned, not even close. Maybe it is not receiving too many new features as people would hope so, but it has more to do with its maturity than anything else. FMX (is) was in frenzy development cycle, only because it didn't have the needed features VCL already had, and it still does not have all. So it may have seemed that FMX is getting all the love and attention, but that was not the case. Many new Windows related features introduced since FMX has come to play, are still VCL only. Keep in mind that IDE is based on VCL, and I don't see that changing in foreseeable future. VCL is evolving and it will continue to evolve. It is not that FMX is new better, improved framework mean to replace VCL for all purposes, it is framework with completely different architecture and it covers different use cases. While some functionality certainly overlaps, and there are (Windows only) applications where both VCL and FMX can be chosen, there are also applications where VCL is far better (and sometimes, even only viable) choice. VCL Styles are buggy, they have been buggy since they were introduced in XE2. But, they are now part of the IDE. That means two things. First, IDE is now suffering from some bugs, but it also means that those bugs will get fixed sooner rather than later. Unfortunately, not all bugs can be solved overnight, and the more specific, reproducible bug reports there are, the higher are chances that those bugs will get a fix. If you have any filed VCL bug reports you might want to share, please do so.
  17. In the attachment you can find a high-level interface-based encapsulation of the Direct2D SVG functionality. It allows you to parse SVG files and draw them to a GDI/GDI+ DC. Requires Windows 10 with Creators Update or later. Main form code to display SVG files: { TForm1 } procedure TForm1.FormCreate(Sender: TObject); begin fSVG := GetD2DSVGHandler.NewSvg; fSVG.LoadFromFile('..\..\browser.svg'); //fSVG.FixedColor := TAlphaColorRec.Red; //fSVG.Opacity := 0.5; fSVG.GrayScale := True; end; procedure TForm1.Paint; begin inherited; fSvg.PaintTo(Canvas.Handle, TRectF.Create(ClientRect), True); end; procedure TForm1.Resize; begin inherited; Invalidate; end; Features: Scale to any size Keep aspect ratio (optionally) Control opacity Recolor to any color Draw in gray scale Samples: The above in grayscale: Svg.zip
  18. jbg

    IDE Fix Pack 6.4.3 breaks compilation

    This bug is now fixed in version 6.4.4. IDE Fix Pack 6.4.4 for Delphi 10.3.2
  19. jbg

    IDE Fix pack for Rio

    Here is a new development snapshot of IDE Fix Pack for Rio. This version detects the WebInstaller and disables IDE Fix Pack inside the WebInstaller so that it doesn't crash the installer anymore. fastdccD103vDev.7z IDEFixPackD103RegDev.7z
  20. jbg

    IDE Fix pack for Rio

    And another development snapshot is available. This time the functions in StyleUtils.inc (Vcl.Styles) got optimized what makes the UI rendering faster. IDEFixPackD103RegDev.7z fastdccD103vDev.7z
  21. Stefan Glienke

    Introducing Delphi Uses Helper

    Introducing "Uses Helper" - some little but incredibly helpful IDE plugin https://delphisorcery.blogspot.com/2021/03/introducing-delphi-uses-helper.html
  22. I just had to do it... Go with the flow! It's the Black Friday / Cyber Monday "season", so I had to rush the book offer The book was actually scheduled for release in early December, but then the Black Friday deals started popping up all over the place... pressure was building... and I finally caved in! I cut the darn thing in two, and decided to offer Part I at a discount, and will give Part II for free to all Buyers. Not really a 97% BF discount but hey... Junior is still studying, and we still have to pay the bills (Corona doesn't help, either)! So, here it is! I hope you'll like it like you did Delphi Memory Management! https://dalija.prasnikar.info/delphiebap/index.html Thank you all for the support!
  23. Carlo Barazzetta

    Looking for SVG support in Delphi?

    I've published an article about SVGIconImageList and IconFontsImageList:https://ethea.it/icons_in_delphi/
  24. Dalija Prasnikar

    My first Delphi 10.3 impressions

    Please fix IDE bugs! We have new icons Please fix IDE bugs! There is barely working dark theme Please fix IDE bugs!!! Now light IDE theme is broken too. I don't mind UI improvements, but IMO this were the wrong ones. I should probably say - I would not have anything against visual UI changes as long as they work properly. Visual changes are (should be) easier to implement than fixing some deeper IDE issues. But, currently IDE is falling apart left and right. Just because it looks better (depending on how you define better - my eyes cannot stand bluish theme for more than 10 minutes) it does not mean that it works better or is more usable.
×