Designing a Form Serializer

This is a discussion on Designing a Form Serializer within the Object forums in Theory and Concepts category; Who decides the boundary in a multipart/form-data request? An Form Serializer builds a string out of the successful HTML Form controls. The string will be passed to an AsyncRequest adapter for XMLHttpRequest.send( data ) Form::getMultipartFormData::string[] AsyncRequest::send( data::string ); The multipart-form/data is where I am having difficulty. A boundary separates field data in the request body. The boundary exists in two places: The data and the HTTP header request. I want to keep the two decoupled. Where should the boundary get created: Form or AsyncRequest? 1) AsyncRequest::send: will have to do some extra work joining form data on the boundary. 2) ...

Go Back   Application Development Forum > Theory and Concepts > Object

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-07-2008, 03:50 PM
dhtml
Guest
 
Default Designing a Form Serializer

Who decides the boundary in a multipart/form-data request?

An Form Serializer builds a string out of the successful HTML Form
controls. The string will be passed to an AsyncRequest adapter for
XMLHttpRequest.send( data )

Form::getMultipartFormData::string[]
AsyncRequest::send( data::string );

The multipart-form/data is where I am having difficulty. A boundary
separates field data in the request body. The boundary exists in two
places: The data and the HTTP header request.

I want to keep the two decoupled.

Where should the boundary get created: Form or AsyncRequest?

1) AsyncRequest::send:
will have to do some extra work joining form data on the boundary.
2) Form::getMultipartFormDataString
will have to provide some way for the boundary to be obtained.

Where should the boundary get created? The AsyncRequest::send, or the
Form::getMultipartFormDataString?

Garrett
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:17 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.