Calling all Coders! Enter the August Programming Competition here

My Project Purpose is:
An HTML & PHP5 web app, and no javascript
Use XMLReader Class to read and write xml
I used to store de data in SQLite version 2.1
You upload a file(xml,csv,txt) to the app and a function detects de format
To export you have a button for each format

Is aceptable?

Now that’s one fine looking user interface IMHO! :tup:

Hmmmm, 3.7 the last? SitePoint only fairly recently upgraded to version 3.8.5 And I’m not sure when they’ll be upgrading to 4.

It might be true that writing a vBulletin plugin would be more appropriate. If you know of any legal, free open-source API documentation please let me know. I’d love to get my hands on the code.

I suppose there are many reasons to not write a Private Message utility application that can run on someones computer’s localhost server, but that’s what this contest is about. Not about writing a desktop application or a plugin of one type or another. But don’t go away, those are good ideas for a future contest.

To me, I think of Linux and Windows (and Mac) as Operating Systems not servers like PWS, IIS, Apache, Mongrel, etc. I guess whatever server you have installed on your computer is the logical choice. Just be sure to mention it in your System Requirements if it’s actually a requirement.

@1 The exported filetypes are Text, CSV, and XML so the application would need to be able to work with at least one of those. And it also needs to be able to work with any new files it creates. I suppose it could for example read the original XML files, save selected messages in a myNewFile.XYZ and be able to work with myNewFile.XYZ again later - if that’s what you mean. My thinking is that if it’s going to read say, CSV, then it would make sense to save them as CSV as well. But if you can think of a better format to save/read new files in, I don’t see any problem with that.

If you mean how they’re displayed, no, it doesn’t need to look like how they’re displayed here at SitePoint. For example, the PHP aoo I wrote (so far) doesn’t convert bbCode tags to HTML tags. So it doesn’t have to, but if you want it to that’s a Bonus Point.

@2 What I had in mind was my being able to do something like open privatemessages-SampleMember-Jul 11, 2010.txt and look for all PMs I sent to OtherMember. In the app I wrote, matching messages are displayed in a table and I can select multiple individual messages or all of them. Then I can create and save a new file, say to-OtherMember-Aug 4, 2010.txt that will have those messages. But I suppose if you wanted to have a “direct-save” that skipped the viewing you could do that instead/too. Heaven knows not every application does things the way I would think they could be done and they’re perfectly fine.

@1 What I mean by fully functional is that it will still work - i.e. select, read, search, display, sort, save - without requiring javascript being enabled to do so. If it works a whole lot better with javascript enabled (less clicks, fancier display etc.) that’s fine i.e. Progressive Enhancement.

@WRT What I mean by “localhost” is a server installed on a user’s computer, like PWS, - Apache as it comes with XAMPP, WAMP - Mongrel as it comes with the “one-click”, etc. not a live shared host. By “typical”, the intent is that the application not require any further installation process. Ideally the application should be able to be downloaded and run as is. Although as mentioned earlier, if special already-installed components need to be enabled having instructions in a README should be fine.

As far as trust levels, I guess it’s fairly safe to assume the one using the app will be the one that downloaded it. But Secure Access is a Bonus Point, so no harm adding that if you think it’s prudent to do so.

why not use jquery and ajax with php, think about it.

Well, I’m disappointed. :frowning: I was hoping to see it.

Actually javascript isn’t the future, I’ve been messing with it for over a decade now. (since way back in my “stupid javascript tricks” days :blush: ) What the requirement is meant to test is a developer’s skill at Progressive Enhancement. Not exactly the future either I guess, but IMHO it should be more commonplace now.

I’ll give the contest a go. My current plan is to use Turbogears 2.1 which is a full-stack, Python web framework.

Looking forward to hopefully getting something submitted.

If I were to submit one, it would be

  • ASP.NET 4 MVC based
  • Run with a few open source libraries to handle details of file parsing and search (will be statically included, no config for the judges)
  • If I were to use a database, it would be MSSQL express.

Would that be acceptable?

Personally, I think its more viable for most people to have/get PHP w/ XSLTProcessor then PHP and MySQL known configuration. Especially if your talking the non-programmers. I think keeping this a non-database driven application is critical. That is why I would prefer to to use XSL and XPath which just seems right considering the XML Import format, efficiency and set-up factor. II mean all the requirements of the project can be achieved using XSL w/ some clever Dynamic XPath manipulation using string replace functions.

If you want to write one in PHP with jquery and ajax go for it.
As long as it will still work with javascript not enabled you’re in.

Getting stuff flying, a few questions about the requirements:

SAVE any selected results to a new separate file (Text and/or CSV and/or XML).

  1. What format–the SitePoint messaging format or the app’s native format?
  2. Define selected–is it “user has checked these messages” or “export search result”?

be fully functional without javascript being enabled

  1. Define “fully functional”–I can see a few scenarios where you would be able to search/export results but some fancy stuff would require js to make it go.

WRT “typical localhost”

Do we mean “typical local use setup” or “typical shared hosting provider”. Especially for .NET apps there are some big differences as you need to consider non-trusted scenarios which can severely limit what you can do with your app.

Question: what localhost server should this run on? linux, windows or both?

@Oddz, SQLite viable? Via PDO. Might save you some ‘chew’.

I was thinking of XSLT myself actually, it would have made the sorting a breeze.

I’m glad it came up soon then. Using “and/or” is one of my grammatical idiosyncrasies (eg. like using (…) and “…”). I know what I mean, so I figure others will too. As old as I’m getting to be I should know better, but that’s another idiosyncrasy :shifty:

But no, working with one, two, or all three formats is fine. TBH I just finished writing my own text file parser class and I’ll be impressed if anyone takes that route.

Also, I’ve though of another Bonus Point
I have no trouble reading bbCode tags, but if anyone wants to change them to HTML tags for the rendered display, go for it!

I would like to scratch XSL in place of MySQL 5. Is that alright? is it alright to assume people know how to create a database and set-up a user with password? Than change authentication data in a XML config file for the app to connect to the db?

I should probably stop thinking about this, but in Visual C#, I think there’s a way to create an MSSQL database as a .mdf file and just bury it inside the single executable file. It effectively creates a database inside the app. Is there a way to create a portable version of MySQL that’s similar to that? I don’t know of any way, but then I’ve only built production quality web projects before, not a desktop app.

Maybe I’m misunderstanding the point of the application. Can I get some clarification? It sounds like these are the project requirements.

Project Purpose: You want to be able to create a dump of your PMs from Sitepoint because you’ve nearly maxed out your PM space. Then you want a utility to operate on that dump and give you the same basic functionality to access, read, and search the PMs similarly to if you were on Sitepoint. All this for the purpose of being able to save those messages locally, while deleting them all (or most) off Sitepoint so you can start collecting a whole new batch of PMs.

Secondary Requirements

The application needs to be easy for people to install locally on their computers.

Is that correct?

If so, don’t the secondary requirements scream desktop application? I realize we’re mostly web developers here, but do you really think the web designers, the SEO specialists, the content writers, etc., etc. have the foggiest notion of how to setup a local server, PHP, a development database, etc.? I would assume that even if you can’t use Open Office or MS Office, you would at least want a solution that you can download, run the installer (or at most unzip the files), and use.

This seems like a situation where a project looks like a web project only because we all write web projects. If I were going to work on something it would probably be Visual C# based winforms / WPF solution. That results in an executable file which can be easily downloaded. Not sure I have the knowledge to get deeply enough into winforms for a 14 day project though.

Hrmmm, thinking about it… How about an Adobe Flex app with PHP? :shifty: actionscript anyone?

OK!

So far it looks like 3 have been given the go ahead!

wwb_99[INDENT]ASP.NET 4[/INDENT]
oddz[INDENT]PHP 5[/INDENT]
KamiQuasi[INDENT]Python[/INDENT]

I was expecting to see PHP, PHP, PHP, PHP … so it’s a very pleasant surprise for me to see there’s interest in other languages.

I’ve been working on my own version that works with all 3 exported file formats.
But that is NOT required. As long as it works with at least one of them it’s fine.

So far I have the initial page which shows a list of the available files with checkboxes
The - “Must SELECT file(s)” - requirement.
and submit buttons for each format.

The second page has several inputs including a “sort by”
The - “Must SEARCH Private Messages by:
… folder, date(s), from, to
… summary, message - by using both single words or phrases” and “Must SORT results in both ascending and descending date and time order” - requirements.
with a submit button and a “go back” return link.

The third page displays any Private Messages that matched the input from the second page. Any or all that matched can be selected. A new file can be given a filename and saved in an existing or new folder.
The - “Must DISPLAY results in a table or table-like rendering” and “Must SAVE any selected results to a new separate file (Text and/or CSV and/or XML).” - requirements.
with a submit button and “go back” return links

IMHO working with only one format and putting something together without any of the “Bonus Point” features will still be quite a task. I suggest you write something basic first and then add the “bells and whistles” if you have enough time. The submission is a Beta after all, not a Release Candidate! It doesn’t have to look like the SitePoint forum. The main concern is that it be easily readable. Anything more than that is a plus in your favor.

Another thing that merits repeating for all interested is to please sign up here BEFORE writing any code!. I wouldn’t want someone to spend a lot of time putting together something the judges can’t read and test.

For example, if I was entering I would leave a post like

Hi, I’m interested in writing a utility app in PHP. The requirements are

  • PHP with PCRE enabled (default as of PHP 4.2+)
  • Text and/or CSV requires PHP 4+
  • XML requires PHP 5 with SimpleXML enabled (default)
    Is this OK?

As long as the application can work with at least one file format, feel free to add any database you like as a “Bonus Point”. That way those that can’t/don’t have a database can still use it, but for those that do, they can.

Personally, if I was writing this for only myself, using a database would be my first preference. But I worry that requiring a database might complicate matters for some members.

Actually the purpose is to have better functionality than what’s found in vBulletin. AFAIK there’s no way to search PMs for Date: To: From: Title: or Message: content. If there is, please let me know.

True enough that a desktop app would be easier to install. But I think it would be harder to write something that would run on a majority of members’ Operating Systems. As SitePoint is a web developer forum as opposed to an OS developer forum, I think such an approach is justified.

Maybe I’m wrong, but it’s a contest not a project per se. Though maybe writing a desktop app would be a good idea for another contest? Or maybe you could write one and market it? Such is the makings of successful entrepreneurship.

I agree that requiring a database is likely to be more troublesome than enabling XSLTProcessor. As I mentioned before, it’s included, just not enabled by default. But if you state it as a requirement and include instructions on how to enable it in a README I don’t see any problems with going that route.

Sounds like a great competition, hopefully I can participate.