1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00
DataTables/examples/advanced_init
Allan Jardine a0455fa858 New: The primary public interface for DataTables' initialisation options is now camel case parameters rather than the Hungarian notation that was used before. There are a number of reasons for doing this, the primary one being that the Hungarian notation used by DataTables is actively stopping people from using the library due to their aversion to using Hungarian notation. Without doubt the Hungarian notation used was a mistake (the reason it was used was that when DataTables was originally written, the company I worked for at the time required the use of Hungarian notation, and thus I was trained in it...).
Backwards compatibility issues: The main goal here (other than to use camel-case notation!) is to preserve backwards compatibility. Unfortunately this isn't 100% possible:
	- DataTable.defaults.columns has been renamed to be DataTable.defaults.column
		- Otherwise it conflicts with aoColumns in the defaults.

Without doubt this is going to be a long process - for example the unit tests and examples need to be completely updated for this change. The JSDoc comments have been updated, so the site should take care of itself for the most part, when released.

In terms of implementation, it is important to note that I have not broken backwards compatibility here - the way it is does is that the current defaults are retained, and a camel-case to Hungarian mapping is automatically generated and then applied to the objects given by the end user. This adds around 0.5K to the size of DataTables, but writing the mapping manually would require at least 3K, and changing DataTables wholesale to camel-case would utterly break backwards compatibility. This is the least 'evil' way to accomplish this. It is important to note that this is a step along the roadmap for DataTables - come v2 Hungarian notation will likely be dropped completely.

One important note to make about this mapping is that if you use camel-case DataTables will copy the value from the camel-case properties to their Hungarian counterparts, so you will end up with additional properties on your source object. As I say, this appears to be to be the least 'evil' option, although still not perfect itself. The challenges of working with legacy software and installs...!
2012-10-07 11:50:29 +01:00
..
column_render.html Update: Examples - remove all reference of fnRender, instead granting preference to mRender. 2012-09-09 12:05:37 +01:00
complex_header.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
defaults.html New: The primary public interface for DataTables' initialisation options is now camel case parameters rather than the Hungarian notation that was used before. There are a number of reasons for doing this, the primary one being that the Hungarian notation used by DataTables is actively stopping people from using the library due to their aversion to using Hungarian notation. Without doubt the Hungarian notation used was a mistake (the reason it was used was that when DataTables was originally written, the company I worked for at the time required the use of Hungarian notation, and thus I was trained in it...). 2012-10-07 11:50:29 +01:00
dom_multiple_elements.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
dom_toolbar.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
dt_events.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
events_live.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
events_post_init.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
events_pre_init.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
footer_callback.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
highlight.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
html_sort.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
language_file.html New: The primary public interface for DataTables' initialisation options is now camel case parameters rather than the Hungarian notation that was used before. There are a number of reasons for doing this, the primary one being that the Hungarian notation used by DataTables is actively stopping people from using the library due to their aversion to using Hungarian notation. Without doubt the Hungarian notation used was a mistake (the reason it was used was that when DataTables was originally written, the company I worked for at the time required the use of Hungarian notation, and thus I was trained in it...). 2012-10-07 11:50:29 +01:00
length_menu.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
localstorage.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
row_callback.html Update: Examples - remove all reference of fnRender, instead granting preference to mRender. 2012-09-09 12:05:37 +01:00
row_grouping.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
sorting_control.html Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00