Blog
- Day 8 : ColdFusion 10 and Enhanced Java integration
ColdFusion built on J2EE compliant technology and this allow you take advantage of integrate with J2EE component and ColdFusion 10 enhanced this capabilities. In previous version we are able to create object of Java classes, using JSP tag etc...etc. but there was pain with using custom java class as you may need to store class file into web_root/WEB_INF/classes folder and you need to restart ColdFusion server every time you update your class file.
I am custom Java class in many places where ColdFusion has limited capabilities or need performance improvement. In past (In ColdFusion 8) we were building up PDF from bunch of photos and this was taking lots of time and memory. We just create custom java class that create PDF the way we want it and improve performance around 10 times. There is javaLoader project which let you execute your custom class without moving it to classes folder and restarting ColdFusion service.
- Read More
- By Pritesh
- Comments(2)
- Day 7 : ColdFusion 10 and Closure - part 2
Yesterday take look on Closure with ColdFusion, now its time to discover more on this.
Closure can be defined as inline without giving name. You can treat like variable and assigned it to variable scope, array or struct element or function return value. for ex.
- Read More
- By Pritesh
- Comments(0)
- Day 6 : ColdFusion 10 and Closure
Wow, ColdFusion now support closure. I am fan of closure and heavily using it on JavaScript specially for ajax call's callback function. Closure is function within function which close all variables of outer function when returned/created. May be not pure theoretically true definition but this is how can I can define in practical term that I have used.
In ColdFusion 10 documentation very simple example given to understand concept of Closure.
- Read More
- By Pritesh
- Comments(0)
- Day 5: ColdFusion 10 session enhancement.
ColdFusion 10 added couple of session related function and add settings related to session cookie. First of all I notice that use UUID for CFTOKEN is default now enable so if you are moving from older version to ColdFusion 10 where cftoken wasn't UUID and you were using datasource for client variables then make sure you update field size in database where you are storing client variables. SessionId generated from application name, cfid and cftoken.
- Read More
- By Pritesh
- Comments(0)
- Day 4: Avoid CSRF attack with ColdFusion 10
Day 4 for my ColdFusion 10 review, since last three days concentrating on all security enhancement. In previous two posts I have covered functions added in ColdFusion10 to avoid XSS attack. Now its time for CSRF (cross site request forgery). As per Wikipedia this is 909th most dangerous software bug ever found. And in normal project we always keep this door open and do not take precaution to restrict it. ColdFusion 10 make it really easy to avoid CSRF attack by adding two functions CSRFGenerateToken and CSRFVerifyToken. First function will generate different token for each session (or each request) which we need to pass with form submit and in action page you need to call CSRFVerifyToken function to make sure request coming through same session and it is not an forgery request. I used to create hash key with combination of session variable and page name which pass with form and in action page comparing same combination with hash key passed in form data.
- Read More
- By Pritesh
- Comments(0)
- Day 3: Avoid Cross-site scripting (XSS) using ColdFusion 10 - Part 2
Yesterday I have tried to look over three newly added security functions to avoid XSS attach on your website. Today look for remaining functions encodeForCSS, encodeForURL and canonicalize.
encodeForCSS:
As function name says it will encode your string to make safe render in CSS. Normally I do not use dynamic CSS but in certain case you may want to change background color of div based on user input. User input??? Yes and it dangerous too as we are opening again door for XSS attack for hacker. Have a look on sample below.
- Read More
- By Pritesh
- Comments(0)
- Day 1: ColdFusion 10 limit number of post request parameters to 100 by default.
Today started celebrating ColdFusion month with series of 30 blog posts on ColdFusion 10's new feature and here first one. This is really not a new feature or enhancement but new administrator setting which may give 400 error (it's not 404) project already running in older version of ColdFusion. In administrator new setting available "Maximum number of POST request parameter" which is default set to 100 means you can post maximum 100 parameter to ColdFusion on form submit. Normally 100 parameters are sufficient for any webpage but in my case I have very complex search which numerous search parameters which exceed ColdFusion administrator limit and when try to submit page give 400 ColdFusion error at first glance confuse with 404 error (seems Adobe change default error template). Even though I have onError method in Application.cfc to catch any ColdFusion error but seems this stopped at server level before executing my Application.cfc. To make sure page exists I had directly paste URL in browser and seems work fine and it drive me crazy, why it showing error while submitting the page????
- Read More
- By Pritesh
- Comments(2)
- Show tooltip when input element get focus
Hello Friends,
Recently I am working on one of the project, and inside it we want functionality to show a hint tooltip box (show information related to that field) when that input element get focus.
I use clueTip (a jQuery tooltip plugin) to show hint tooltip box.
- Read More
- By Mahavir Dhruv
- Comments(0)
- Problems, tips and tricks about Magento
-
Hello friends,
I am new to Magento. I find many configurations that has to be done before you make your Magento site live. So I thought I should list out all important configurations at one place so that this list can also be used as checklist as well as tips and tricks for new Magento developers.
- Read More
- By Vikas
- Comments(2)