So giving the benefit of the doubt regarding programming ability, and simply assuming the case of "not knowing what's out there", here's the tools and configuration settings that I always use when developing MapGuide applications, which should greatly assist and simplify the process of developing and debugging MapGuide applications. Experienced web developers can probably tune out because you should already know these tools :)
If you haven't heard of firebug or haven't used it before, stop reading this post and download it now. DO IT!
- CSS/DOM debugging
- HTTP request tracing / performance monitoring. (you can see all the requests that Fusion/AJAX viewer is making to your MapGuide Web Tier)
- Lots more!
2. Mozilla Firefox
Besides the fact that this is needed for firebug, Firefox is the epitomy of the modern web browser, and has lots of healthy competition from Google Chrome and other WebKit-based bretheren to help keep moving the web forward ... Unlike that browser from Redmond^!
But even still, the Firefox + Firebug combination provides a solid foundation for your design ensuring that the time spent in Internet Explorer is kept to a minimum*
My web development workflow is simply:
- Design and develop and test in Firefox / Firebug. This design will 99.9% work in all modern browsers.
- Contort and bastardise this design (hopefully not too much) to make it work in Internet Explorer
- Re-test against Firefox / Firebug to ensure no breakages.
3. Baretail + MapGuide log files
Believe it or not, MapGuide actually logs lots of information when its running (under default server configuration settings). If a viewer has made a request to the MapGuide Server, it is logged. If MapGuide throws an error, it is logged. If something has made the MapGuide Server fall over, chances are it is logged. Simply put, the logging facilities built into MapGuide provides you with a lot of information to work with. When things go south in your MapGuide application, the log files should almost always be the first port of call.
Baretail is a windows utility that is effectively the windows equivalent to the unix tail utility, showing you the latest entries in error.log and access.log (and any other log file) as they are written by the MapGuide Server. It is an invaluable resource to assist in debugging and problem diagnosis. Does your MapGuide application code not work? Try running it again while observing the mapguide logs under baretail. They might tell you something.
4. Set display_errors = On in php.ini
The PHP that is bundled with MapGuide uses production-level settings. This means any warnings or errors (like unhandled MapGuide exceptions) in any PHP code you may be running are silently swept under the carpet most of the time. Setting the display_errors setting to On in php.ini will reveal and display these errors. If PHP is your development environment, this should be the first thing you do on a fresh development install of MapGuide.
Knowing these tools and configuration settings have made my web development life simpler, I hope this post makes your's simpler too!
^ Generally speaking, where IE gets it completely wrong is in two areas: 1) Certain parts of the DOM API and 2) Flagrant disregard or misinterpretation of certain CSS rules (most infamously, the box model bug). But it's 2011, these are known problems solved by almost every web framework out there, which you should be using already! Which is why I said that the Firefox + Firebug combination takes you 90% there.
* I think if all of us web developers charged a mandatory "IE tax" on our web development work, it would make some of these regressive organisations think twice about holding us (and the modern web) back by still mandating Internet Explorer 6 as the "standard web browser". Microsoft got the message, why won't you!? To be fair, none of the clients I have worked with in my career thus far fall under this category, but the fact that there are still such organisations out there makes baby Jesus cry! At least IE9 is a half-modern web browser, and if Microsoft is serious about its vision of application development for Windows 8, they have no choice but to make IE10 an actual functional modern web browser!