Archive for March, 2007

Disconnected

Thursday, March 22nd, 2007 at 3:57pm

When I first started cutting my teeth on dynamic web site development, I was pleased that Dreamweaver has plenty of tools to help out. Because we used it at work for sites, I chose the ASP.NET/C# server model, and used Access as the database (perfectly adequate for the size and features of the sites I was building).

Now I’m beginning to get to grips with PHP/mySQL for development. That’s going well too. And having used mySQL for a while, I can see the advantages over Access. But what I’d really like to do is upsize a few of my Access databases to mySQL and have them connect to my existing .NET applications, without having to re-write the damned things.

The data migration tools available to s smooth job, and the data is sitting there, ready to go. But now I’ve hit a brick wall. How to tell Dreamweaver I want to use a mySQL database instead of access! So I began looking for the correct connection string, this was some help. I also downloaded MySQL ODBC 3.51 and installed it.

Then I set the web.config file entry to this (bold being the connection string given in the link above):

<add key=”MM_CONNECTION_STRING_connPortfolio” value=”Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDatabase;User=myUser;
Password=myPassword;Option=3;” />

I tried the TEST button and Dreamweaver connected successfully! But try running the site via the browser (or Dreamweaver Live Data View) and it falls over with an error:

System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, ‘Provider=SQLOLEDB;’.
at System.Data.OleDb.OleDbConnectionString.ValidateParse()

So tried a different connection method, using Connector/Net 1.0.9 with this syntax in the web.config file – but got very similar results. Then I found this following in an Adobe Tech Note (my emphasis):

Do I have to use ODBC?
No. For ASP sites you can also connect to a database using OLEDB. For ASP.NET sites you must use OLEDB or the native ASP.NET SQL Server connector.

So it looks like it has to be OLEDB, but how to put the correct provider in the connection string? Nothing I’ve tried seems to work! Any clues? Has anybody actually got this combination to work?

  • Dreamweaver 8
  • ASP.NET/C# server model
  • mySQL database

Mobile Web Best Practices

Tuesday, March 20th, 2007 at 3:55pm

Sheila went to the 3GSM World Congress in Barcelona a few weeks ago, and picked up a handy set of cue cards on designing for the mobile web, which she was kind enough to give to me. It was great timing, since I’d been thinking for a while about the best way to go about designing for mobile devices. The cue cards promote the W3C’s Mobile Web Initiative, and are great prompts on the best techniques to use.

[Mobile Web Best Practices cue cards]
So for those who don’t have a copy, I thought I would share the wisdom that they detail. More info can be found at http://www.w3.org/TR/mobile-bp/ – but the below is a distilled and much more user-friendly summary.

10 Ways To Mobilise
The cards are broken into ten topics, with hints and advice on each:

1. Design for One Web
Content designed with diverse devices in mind reduces cost, increases flexibility, and reaches the needs of more people.

Thematic constistency – ensure that content provided by accessing a URI yields a thematically coherent experience when accessed from different devices.

Capabilities – exploit device capabilities to provide an enhanced user experience.

Deficiencies – take reasonable steps to work around deficient implementations.

Testing – carry out testing on actual devices as well as emulators.


2. Rely on Web Standards

In the highly fragmented market of devices and browsers, standards are the best guarantee for interoperability.

Validate Markup – create documents that validate to published formal grammars.

Content Format Support – send content in a format that is known to be supported by the device.

Content Format Preferred – where possible, send content in a preferred format.

Character Encoding Support – ensure that content is encoded using a character encoding that is known to be supported by the target device.

Character Encoding Use – indicate in the response the character encoding being used.

Style Sheet Use – use style sheets to control layout and presentation, unless the device is known not to support them.

Structure – use features of the markup language to indicate logical document structure.

Error Messages – provide informative error messages and a means of navigating away from an error message back to useful information.


3. Stay away from known hazards

Thoughtful design can help reduce usability problems due to small screens and keyboards, and other features of mobile devices.

Pop Ups - do not cause pop-ups or other windows to appear and do not change the current window without informing the user.

Tables Nested – do not use nested tables.

Tables Layout – do not use tables for layout.

Graphics For Spacing – do not use graphics for spacing.

No Frames - do not use frames.

Image Maps – do not use image maps unless you know the device supports them effectively.


4. Be cautious of device limitations

When choosing to use a particular web technology, consider that mobile devices vary greatly in capability.

Cookies – do not rely on cookies being available.

Objects or Script – do not rely on embedded objects or script.

Tables Support – do not use tables unless the device is known to support them.

Tables Alternatives – where possible, use an alternative to tabular presentation.

Style Sheets Support – Organise documents so that, if necessary, they may be read without style sheets.

Fonts – do not rely on support of font related styling.

Use of Colours – Ensure that information conveyed with colour is also available without colour.


5. Optimize navigation

Simple navigation and typing become critical when using a small screen and keyboard, and limited bandwidth.

Navbar – provide only minimal navigation at the top of the page.

Navigation – provide consistent navigation mechanisms.

Link Target ID – cleary identify the target of each link.

Link Target Format – Note the target file’s format unless you know the device supports it.

Access Keys – assign access keys to links in navigational menus and frequently accessed functionality.

URIs – keep the URIs of site entry points short.

Balance – take into account the trade-off between having too many links on a page and asking the user to follow too many links to reach what they are looking for.


6. Check graphics & colours

Images, colours and style brighten content, but require care due to inconsistent support for some formats low-contrast screens.

Images Resizing – resize images at the server, if they have an intrinsic size.

Large Graphics – do not use images that cannot be rendered by the device. Avoid large or high resolution images except where critical information would otherwise be lost.

Images Specify Size – specify the size of images in markup, if they have an intrinsic size.

No Text Alternative – provide a text equivalent for every non-text element.

Colour Contrast – ensure that foreground and background colour combinations provide sufficient contrast.

Background Image Readability – when using background images, make sure that content remains readable on the device.

Measures – do not use pixel measures and do not use absolute units in markup language attribute values and style sheet property values.


7. Keep it small

Smaller sites make us
ers happier by costing less in time and money.

Minimise – use terse, efficient markup.

Page Size Limit – ensure that the overall size of page is appropriate to the memory limitations of the device.

Style Sheet Size – keep style sheets small.

Scrolling – limit scrolling to one direction, unless secondary scrolling cannot be avoided.


8. Use the network sparingly

Web protocol features can help improve the user experience by reducing the impact of network bottlenecks and latencies.

Auto refresh - do not create periodically auto-refreshing pages, unless you have informed the user and provided a means of stopping it.

Redirection - do not use markup to redirect pages automatically. Instead, configure the server to perform redirects by means of HTTP 3xx codes.

External Resources - keep the number of externally linked resources to a minimum.

Caching – provide caching information in HTTP responses.


9. Help & guide user input

Keyboards and other input methods on mobile devices can be tedious to use, so effective designs minimize the need for them.

Minimise Keystrokes – keept the number of keystrokes to a minimum.

Avoid Free Text – avoid free text entry in forms, where possible.

Provide Defaults – provide pre-selected default values where possible.

Default Input Mode – Specify a default text entry mode, language and/or input format, if the target device is known to support it.

Tab Order – Create a logical order through links, form controls and objects.

Control Labelling – label all form controls appropriately and explicitly associate labels with form controls.

Control Position – position labels so they lay out properly in relation to the form control to which they refer.


10. Think of users on the go

Web users on the go want compact information when time is short and distractions many.

Page Title – provide a short but descriptive page title for every page.

Clarity – use clear and simple language.

Central Meaning – ensure that material that is central to the meaning of the page precedes material that is not.

Limited – limit content to what the user has requested.

Suitable – ensure that content is suitable for use in a mobile context.

Page Size Usable – devide pages into usable but limited size portions.

And reading through these, most of the list sounds equally applicable to overcome other accessibility issues. Wise advice, which isn’t always easy to follow!

Decisions, Decisions

Wednesday, March 14th, 2007 at 5:05pm

I’ve been in a dilemma for the past few days. Ever since finding out that d.Construct2007 and BarCampBrighton are scheduled for 7th, 8th & 9th of September, it’s posed me a problem. Which is that it’s the exact same dates that the Rugby World Cup starts in France, and the opening games with France vs Argentina and then England vs USA are the ones I want to go to.

So, there’s been some weighing up of pro’s and con’s, and I’ve just booked the rugby trip! I figured that, even though I had a great time at last year’s d.Construct, since it’s an annual event, there’s always 2008 – whereas World Cups only come round once every four years – and the next one is in New Zealand – hardly a convenient hop across the channel!

The worse-case scenario would have been me prevaricating for so long that tickets to both events had sold out. So I thought it best to jump now and forever hold my peace :-)