Re: [LHA-misc] Web interface ...
Status: Beta
Brought to you by:
ncherry
From: Mike B. <mi...@ba...> - 2001-05-26 12:23:40
|
I've been a Perl fanatic/programmer for a LONG time an normally would agree to go with Perl. However PHP is an excellent langauge for web based interfaces to data of all kinds - it has all sorts of cool features including automatic session tracking, etc. The propblem is, PHP is not installed by default like perl is, but there are generally binary packages available for easy install. As for cross platform - well, just because a language is cross platform, doesn't mean your app will be :) It still will need to be ported. So use what works best for you. Perl is an awesome language and the wealth of CPAN modules available is staggering, but PHP also has strong points - especially from web interface perspective. Now regarding Java and Javascript - avoid them like the plague - every browser implements Javascript slightly differently so you spend way too much time checking for browser type to do things differently. Java is more standard, but again, some browsers support it better than others. So if you make them a requirement, you'll find many users with browsers that don't function properly for a variety of reasons. Thank Microsoft, Netscape, and Sun - as they tweaked their 'standard' the others wouldn't adopt it, but the site builders would. Now web developers pull their hair out trying to make sites cross browser compatible. Its a nightmare. If you use COMMON functions and commands in JS you should be OK, but you always have to duplicate your code in <NOSCRIPT> tags for browsers that don't support Javascript OR for users who turn Javascript off (there are many of those) In thinking about my own web interface, I seriously considered using Java since you could dynamically update it and such, but I finally decided that to START with, it would be auto refreshed web pages. Then I'll add an OPTION for a 'Java Enabled' interface which will replace and/or supplement some screens with Java applets. Thus the user has the choice. You'll find many web interfaces to backend systems do this. Just some thoughts. Mike (Yes, I'm still alive - but the past 6 months have been an adventure - more on that soon....) Neil Cherry wrote: > "C. R. Bryan III" wrote: > > >>I wrote: >> >>>Since it's been raining and slowed my training down a bit (I've got a >>>100 mile ride, tomorrow, in the rain and "boomers") I've spent a little >>>time working on a web interface to HA. This initial version uses Apache, >>>PHP, HTML, JavaScript (very little but I'm working on that) and >>>HomeDaemon-dump. I haven't started working on the security or user >>>verification yet but I will (I have examples and need to think it >>>through further). I may post the code to be played with in the next week >>>(I need the instructions). >>> >>>Anyone want to comment on what they think is a good web interface. Normally >>>I don't like web interface because they're just links and a form box. This >>>one isn't much better except that I use PHP to update the table dynamically >>>so we think we know the state of the device (it's X10 'ya know'). I'll >>>further expand the PHP/JavaScript/HTML code further to include the weather >>>station, Ocelot, and the HCS II. All of this is going into the contest >>>for Aug. Though I don't think I can win I will attempt to put on a good >>>show. I think the work can become an article for one of the magazines. >>> >>I suggest Perl for the initial effort rather than PHP. >>Perl's cross-platform. That includes Perl/Tk, which is potentially >>the same widget-set design expressed on the local desktop rather than >>in a browser, talking through sockets if the command hardware's >>running on a different machine. Perl's module set will probably allow >>you to extend down further into daemon-land for rapid prototyping. >>Perl/db supports source-level stepping of your code. Setting the -w >>switch causes Perl to dump its complaints into your Apache error-log >>when it's talking through the CGI, so you don't have to scoop them >>off a rapidly moving screen or peek into commented-out sprintfs in >>'view page source' to catch anything. >> > > I had a little time to think about this last night and I have a question. > Does the Apache Perl module support Perl/TK? The code I've written is an > HTML page w/PHP & JavaScript. The reason is so that part of the Client > does some of the work and the web site uses a fresh reference. I may > switch the JavaScript to Java if I'm not able to get the client to > behave the way I want it to. For now this is just the web page interface. > I have worked on client software for non web interfaces. That code is > portable between Windows and Linux (I haven't tested it else where yet). > > |