Saturday, May 23, 2009

Nearly Dead: AppControls Slowness due to Hooking

Q: What happens if you put too many hooks in 1 form?
A: The window acts very slow because chain-of-command passes from one hook to another.

For example, putting 50 AppControls components will lead to slow form.
(50 chained hooks)


On other hand, LMD and TMS resolve this issue by using global form hook instead.
(1 hook, different components listen into that 1 hook)

Nearly Dead: DiskControls Reviewed

DiskControls is small library to disk processing
Vendor's URL: appcontrols.com
(Utilminds is off-line)

Briefly:

dcMultiDiskscanner/dcDiskScanner - does not support regex or look into file contents

dcFileOperation - suggest you look at ShellApi.pas

dcFolderMonitor - suggest you look at ShellApi.pas

dcFileCRC - has problems with large files because it loads up whole file into memory
Missing MD5 and SHA1.

dcTail - combination of dcFileOperation and callback

dcVersionInfo - use any Version Information component...

dcShellLink/dcShellIcon - suggest you look at ShellApi.pas

dcFolderListView - it's missing dcFolderShellTree (that tree on left panel in explorer), dcFolderFilterBox (the filter bar on top in explorer), dcFolderProcessing (the internal glue control between the filterbox, shelltree and listview)

dcFileEdit/dcFolderEdit - it's missing MRU list. No flat style either


Conclusion:
This is mixed review.

For example, the Shell Components could be much expanded to include more Shell Components that Windows has, RegEx library for file searching, Internal file searching, and others.

And of course - the #1 thing:
Please make sure your demo actually works.
URL at appcontrols%com/demos.html
(you may need to copy&paste and change the % sign to ".")

I can list down:
1) Folder does not exist...
2) disk search causes AV on reading "system directory"
3) Permissions causes AV on disk search.
4) Links are ANSI based
5) Folder monitor component slows down PC

Nearly Dead: AppControls Reviewed

AppControls / Delphi 2009 Reviewed
Vendor's URL: appcontrols.com
(Utilminds is off-line)

AppControl's history stopped at Year 2006 (see Version History) and then they released some updates for Delphi 2007 (in March 2007).

My review is based on AppControl / Delphi 2009 version. AppControls is simple library made for making tedious tasks easy.

Non-visual components were "nothing special".

Initial observation was Unicode problems, or rather, using WinExec(PAnsiChar) instead of Modern ShellExecute(). Most of codes uses "String" and obviously, the author never bothered to make a "Unicode" version of this library (until CodeGear Delphi 2009 came out and forced every vendor to upgrade to Unicode).

Most of code is simple, straight forward, like a collection of snipplets from Torry's or DelphiPages. For example, Application Mutex is straight forward. Do you really need to wrap it up in a component? Same goes with AutoRun (put your program to AutoRun when Window starts), AppEvents (Application events) (this is now in Delphi as AppEvents), TopMost (Force Window to Foreground).

Next observation was acInfoBox, or simple MessageBox replacement. I would suggest people to look for BradStower's freeware DontShowAgain MessageBox instead (it's cheaper by US$20 per developer).

Briefly:
AppAutoRun -- you can do it add/delete via registry to Windows\Run

AppStartCounter -- increment a number inside registry

CronJob -- set a timer and run lookup a time-list (e.g., run @7am)

AccurateTimer -- get a real profiler instead if you need to find out why your app took so long

AwayTimer -- suggestion: don't hook the keyboard and mouse during hiberation. that hangs the WinXP computer

AppEvents -- use the real TAppEvents instead

AppCursor -- Suggestion: too many hooks in 1 application spoils the whole application.

acOnlyOne -- use CreateMutex instead. (Does not work when App is minimized to tray)

acTrayIcon -- use TTrayIcon instead.

acShortcut -- use Jedi instead. Jedi is Unicode-aware (uses Widestring)

acFileextension -- use Jedi File association instead (at least jedi is Unicode-aware)

acClipboard -- does not support CF_RTF or CF_HTML. Also, only supports BMP.

acUpgrader -- does not support resume. it uses memorystream. if your upgrade is 10megs, it eats up alot of memory

acRssFeed/RssfeedContainer -- does not support atom, rss2, and rdf.

acAppBar/acFormMagnet -- try using freeware 'magnet' component instead. this component uses alot of hooks

acCaptionButton - titlebar buttons. does not work well on Vista, Citrix, Windows Terminal Server, Windows 2008. Also does not work when Title bar is skinned. (you use different Windows themes or Windock)

acAnimationEffect - is it necessary to animate form when loading/closing?

acWin2kEffects - n/a - features built-into Delphi 2005 and above.

acFormHints/acFormHelp - (same problem with acCaptionButton)

acSystemMenu - use freeware instead (same hooking problem as above)

acFormTopMost - google for "DSiForceForegroundWindow".

acFormRoller - google for "TurboPower Essentials".

acFormRestrictions - see "Anchors"

acFormSizeGrip - see "bsSizeable" in your Form properties

acFormHook - see "AppEvents"

acFormBackground - flicker issue. use others (vendor components) instead.

acEmbeddedForm - use TFrame instead

acFileStorage - use Resources / BRCC (Borland Resource Compiler) instead

acWavePlayer - use "PlaySound" Win32 API instead

acCursorLock - use "ClipCursor" Win32 API instead

acThread - use non-VCL based threading instead. This component is linked to TForm and hooked events.

acInfobox - use Brad Stower's DontShowAgain / or Jedi MessageBox instead

acProcessList - use Jedi's Process List instead

acConnectionList - use Jed's instead (Jedi has enumerations for Cable Modem and Router)

acIESniffer - use Balsa's HTML freeware component. That has more features

Visual Components
For the life of me, is it necessary to have a UrlLabel? or simple button that does nothing much?

acButtonsPanel - not enough buttons - this only provides Apply, Cancel, Custom, Help, OK.

acButButton - does not emulate IE flat or Office XP features
(fair enough, I did not include XP, Vista, MS-Money or Office 2007 styles)

acCheckGroupBox - not sure what the idea is to include both CheckBox and Groupbox together.

acSplitterPanel - no way to specify splitter (the thing in the middle between two panels) style.

acHeaderPanel - I need to implement docking by myself...

acPicturePanel - use TPanel, TBevel, TLabel together to achieve same effect

acLinksPanel - use TListView instead (at least, that allows multiple columns)

acDragPanel - use TPanel and track MouseMove

acEdit - has no "flat" feature

acNumberEdit - does not support 2^64 integers.

acIPEdit - use Microsoft's Common Controls instead/ or MaskEdit

acComoboDatePicker - use normal ComboBox with items Jan...Dec

acTrackBar - does not paint correctly in Windows Vista, Windows Terminal Server and Windows 2008.

acTreeView - not much difference. Suggest you use TTreeview.

acListView - does not support "flat" style.

acStatusControl - not sure why you need this for. Would suggest BradStower's StatusBar component.

acHeader - not skinned correctly in Windows/Vista/Windows 2008/Windows Terminal Server/Citrix.

acHTMLViewer - does not support enough tags. Currently at HTML 1.0 tags (or maybe worse)

acSystemInfo - simple query of System Information
(suggestion to vendor: why don't you make it return SystemInfo to TStringList so I can report it without writing reams of code to connect to your component)

acDateCalc - use FormatDateTime(TimeStart - TimeStop) instead

acUnixCrypt - Unix crypt with salt
(suggestion to vendor: would you mind making the DFM not store the salt and password?)

acStringListContainer - use Jedi's instead. Jedi's string list container allows storing multiple texts at once

acTextTemplateConverter - use StringReplaceText(...) instead

acSimpleTCPServer - can we suggest ICS or Synapse or Indy?

acQuickAboutBox - can we suggest you spend 15 minutes to put a Dialog, 4 Labels "Application 1.0", "Copyright", "Version", "YourWebsite.com" and "OK" button?


Pricing
For US$149 per developer or US$745 for 5 developers, this sounds expensive for simple library.

For US$149, there's TMS Library (with more components and better quality), LMD basic (for 1 user), ElPack basic (for 1 user) and other component packs competing for your money.


Conclusion
This is simple library and not updated much since 2006. DelphiHater wishes the author would spend a bit more time on this library and try to answer questions on Borland/Imprise/CodeGear/Embarcadero newsgroups before customers feel left out in the cold with no-replies.

[corrections: Typo's]

Friday, November 21, 2008

Jedi, an expensive hobby.

Being Delphi Jedi knight is expensive now-a-days.

Delphi costs US$899 and S&H and applicable taxes.

Now suppose you had US$899 to burn, what would you spend it on? In this day and age, US$899 would probably buy 40 trips of fuel (depending on price) or say, around a month's living expenses.

Would you spend US$899 and US$399 every year to do charity work? Php is free, Visual Studio Express is free, and so on...

Maybe I'll just save the money and use C# and VB.NET instead. It's pretty good, btw. At least I can learn something and get good job. Have you heard of any good Delphi jobs lately? I haven't.

Delphi 2007 update plan

From the newsgroups:

Hi guys.
Have Codegear a plan to lauch a new update for Delphi and Delphi.NET 2007 ? It´s absurd that your clients need to buy a D2009 and Prism to corret problems of a older version, right? We have HUGE problems with 2007 IDE ... more on .NET . Problems with generics thats disappears, IDE hangs after code completion in a generic object, big memory usage , slow switch beetwen design and source code ...


TeamB replies:

Now that 2009 has been officially released, I doubt 2007 wil get any more updates.

Why? That is how most software vendors work. Once a new version is released, older versions are no longer maintained, unless they use different architectures that have to continue being maintained in parallel.

Customer reply:It seems incredibly unfair of CodeGear to say "Thanks for the money, but no more bug-fixes for you."

LOL

Wednesday, October 15, 2008

Unusual Post. How to prevent Delphi third-party software piracy

This is perhaps the most unusual post I've ever posted.
Some Delphi developers have posted what should be done about Delphi third-party piracy.

Here is my best advice:

Delphi has an option to create both DCU and BPL packages.

Interestingly, when it creates a BPL package, it can link to the BPL without any DCUs required. This is called dynamic linking.

Thus, you can link your trial DCUs and BPLs. The person will link to the trial BPL without requiring any DCUs

Of course, when you have DCUs, they are unprotected assembly files while BPLs can be protected (e.g., using AssProtect, Arnie Armdillo).

Make me a BPL!
The most successful Delphi vendors I've seen never ship any DCUs with their trial products, they only ship BPLs. Much to the amusement, these vendors get lots of sales and healthly profits.

The vendors who are struggling often provide Trial-DCUs and sooner or later, cracked versions of their DCUs are floating around on the Internet.

DelphiHater's advice to all Dephi third-party vendors out there:
Start shipping your trial products with BPL only.

No DCUs are required to create the trial. Product your product using some copy-protection.
Then, watch how your trial customers get really pissed-off, and how they need to "buy" :)

Nearly Dead: ShellPlus reviewed

ShellPlus reviewed

It could be said the vendor is playing "Shell games" with delphi developers - with slow updates (1), buggy software (2) and spam-filled forum (3).

For point (3) See www.shellplus.com/forum/ for their forum :)

For point (1), look no further than the once-a-year DCU update and no Delphi 2009 support. In order to get Delphi 2009 support, you would probably have to wait more than 6 months from now. (They took 9 months to get Delphi 2007 support out :( )

They often hint you to buy the sources to fix the problems yourself. Since the Source code is updated on yearly basis (i.e., you buy the license every year) you can nearly forget about bug fixes.

For point (2) It don't work, work on Vista.
Surprisingly, the product does not work on Vista. The reason is because internal in the code, it has many internal access violations. The exact reason is because the author hard-wired many ShellPlus codes to fixed constants in Shell32.dll and User32.dll.

The source code is nearly worthless. Your blogger, Delphihater brought ShellPlus and sources, and later spent like nearly three hair-raising weeks adding Unicode support to it, fixing nearly hundreds of bugs with it (Did anyone notice their Mantis bug tracker site is password protected?) only to give up when none of the fixes work with Vista.

Eventually, DelphiHater re-did the whole Shell integration in C++, not because DelphiHater hates Delphi, but for these reasons:

1) Delphi has no 64-bit version, so 64-bit Explorer will not load 32-bit Delphi DLLs

2) Delphi 2009 (Unicode) has no good 3rd party support. In this case, ShellPlus has no Delphi 2009 version.

3) The shellplus code has DEP problems. It uses excessive pointers and don't free them correctly - big no-no in Windows XP-SP2, XP-SP3 where DEP is enabled by default.

4) You would have to extensively debug ShellPlus on Vista 32-bit SP1 to get it to work. Believe me, after that, you can drop ShellPlus.

5) Many things claimed don't work. The Explorer toolbar don't work correctly, the NSE-Name_Space libs don't work as claimed. There are so many issues outstanding.


Updated:
Please see my fan-mail response
Fan Mail response

March 2013 update:
They do not have a 64-bit version of their product. Even if you buy the source-codes, you will find it arduous task to update the whole library to 64-bits, then find lots of instability with your Shell Extension. Suggestion is to use C++ or C# - See http://stackoverflow.com/questions/2194572/windows-shell-extension-with-c-sharp  


See: Article Corrections

Wednesday, October 1, 2008

Book Review: In Search of Stupidity

I brought the book In Search of Stupidity 2nd Edition.
The best laugh I had was Chapter 7:

Frenchmen Eats Frog, Chokes to Death:
Borland and Phillipe Kahn
(This review comes from the 2nd Edition, not the 1st Edition)

Insult upon Insult
The book starts off very simply with purchasing Ansa (the owner of Paradox database) then Surpass database (the product was renamed to QuattroPro). Where Kahn's behaviour got the better of him, was the purchase of Ashton-Tate (the makers of DBase). Most of Ashon-Tate's employees were treated very badly, destroying customer's databases, and AT's employees took time to call many key DBase gurus and told them how bad the Borland acquisition of DBase became.

Borland (by Kahn) made DBase "a diry language" and allowed DBase to rot, never bothered to fix many bugs (sounds similar?). Without any decent compiler, DBase languished. The Dbase community got nervous and then migrated to FoxPro.

Borland became Imprise and then Borland, then (some nonsense name), then later CodeGear and then their Tools divison got sold to Embarcadero.

Delphi Hater's Experience
Borland's high-handed tactic was to brand anyone who critized Borland's products troll, trouble-maker and insult upon insult.

Take for example, someone commenting how bad Delphi.NET is, and then branded as Troll (trouble-maker).
http://groups.google.com/group/borland.public.delphi.non-technical/browse_thread/thread/bf1d883ea6e71e84/62956bfe7291ea57

Website Obitruary: ducktech.com

Duck Reporting from DuckTech.com

Like many QuickReport alternatives, it is similar: All Delphi report writers are expensive, full of issues and with bad support.

Quack, Quack
Duck Reports is a report-writer with a report-writer editor and bar-code support. Like many report-writers, it was built for Delphi 3, Delphi 4, and Delphi 5, using the BDE engine.

It was really good, except the price was US$250 per license and like many Delphi vendors, no support for Delphi 6, Delphi 7. The product had little or no help files (not surprised) and very little support.

What happened?
The product looks good but there were serious problems - the lack of future Delphi support, the lack of features (e.g., dot-matrix printer) and BDE independence laid it to doom.

Eventually, ducktech.com went off-line.

Website Obituary: Classic Software

ClassicSw.com - the site now goes to new owner.

Classic Software was one of the first VCL components for Delphi.

The product library worked in 16-bits and 32-bit mode. Those of you who purchased it, it was for Delphi 1, Delphi 2, Delphi 3 and then the company closed down.

Classic Software sold their Chameleon Tabs and Component Collection. The Chameleon tabs was list of panels with owner-draw custom "tab-set". It claimed to have colored tabs, but the color tabs didn't go too well in 256 colors Windows. The different tab shapes were limited to 3 shapes: Windows 3.1, Windows 95, Windows NT style (not much use), the Glyphs didn't work so well in Windows 95/98.

Classic Components was simple custom-grid control with simple Editor, simple date-time picker, simple number (mask-edit) components embedded inside it.

The vendor was very responsive to sales questions but support was non-existent. Since the product was not generating any sales, it was left to rot. When sales went zero, the website went off-line.

What happened? Borland Delphi became Inprise Delphi which lead to much confusion... Another company, Woll2Woll InfoPower wrote better Grid, better editor.

If my memory serves me right, they advertised heavily (btw: costs alot of money) on Delphi Magazine, Delphi Developer Journal, Delphi Informant (or possibly more magazines) and perhaps, due to poor sales, closed down.