开发者

What non-OO language can a web dev use to create a one-off desktop app?

开发者 https://www.devze.com 2023-02-25 19:44 出处:网络
I\'m looking to develop a Win32 desktop app - a one off, for a personal need. A GUI is not scrictly needed, though would be a bonus.

I'm looking to develop a Win32 desktop app - a one off, for a personal need. A GUI is not scrictly needed, though would be a bonus.

What is needed:

  • The ability to monitor the window title of a specific window.
  • The ability to run DOS commands when this window title changes.

I hope my programming ability is up to this - I feel I'm pretty good with PHP, but I'm not ready to spend time learning OO for this one-off project.

What non OO (or at least not mandatorily OO) languages are there for desktop apps that mi开发者_运维问答ght be suitable for a beginner on a task like?

Any other, more hacky approaches are welcome too - batch scripts etc.

Many thanks for any advice,

Jack


Whether or not the language supports OO doesn't really matter for your purposes. After all, PHP supports objects and you seem to do just fine with it.

Personally, i'd recommend Java or C# to get started with. The communities for these two languages are huge and there are plenty of tutorials online to help you get started.

It's extremely easy to get starting writing C# with Visual Studio Express. And a good hello world tutorial.

Also, if you stick with C# you can take advantage of WMI which will allow you to do everything you need for this project (and much much more).

Lastly, most windows machines will be able to run your application without having to install anything extra and Visual Studio builds the .exe for you as part of the build process.


You can use PHP for desktop apps if you really want to. Just install the php CLI. You can even do a gui for your desktop app in php: http://gtk.php.net/

EDIT: I'm not sure how easily you can call win32 api functions from PHP, however. There look to be a few articles about this online and a SO question: How to call winapi functions from PHP?


I would vote for Python using the included TkInter module for GUI. Dead simple to use. Widgets aren't the prettiest looking, but development is rapid.

EDIT: I mistook "non-OO" in the question for "OO". Python is most definitely not "non-OO", but but is very well suited to doing what you asked.


You could write this in pretty much any mainstream language supported by Windows. C or C++ are obvious choices. C# and Visual Basic .NET are going to require the .NET Framework ... not a bad thing, but perhaps more than you want to tackle for a simple project. Come to think of it, you might be able to do this with JScript or VBScript, although I'm not clear on what API functions you have easy access to. And I have to believe that it's possible to do with PowerShell with just a little work.

Your options are wide open.


F#

It's an awesome piece of work, has access to the Framework class libraries, supports GUI development, really easy parallel programming, compiles to IL (same as C#) but has a really concise functional syntax.

0

精彩评论

暂无评论...
验证码 换一张
取 消