Some questions that relate to ES


Author
Message
Ben Hayat
Ben Hayat
StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
After the training class, I met with a client and told him about the ES in more detail and we have decided to split the project into two sections: a) WinForm b) WebForm.



a) The winform is responsible to allow the employees in different cities to create new records. These employees will be connected to the main Database via ES. The employee will be entering text data and taking images of objects and maybe, small videos per record.



b) The Webform is responsible to show those data and pictures and videos from the server to public who serf the web via bowser.



Questions:

a) Since the images are ultimately going to be consumed by webserver, should each image be stored as a single file or should it be stored in database as BLOB field?

a1) If stored as BLOB field, at the time of showing it on the web, does it need to be converted into a single image file for Webserver to use it?

a2) If the images is stored as single file to begin with, will ES stream the image from the client to the server and store it for me?



b) The second part is, if the user with Winform, records a video clip, can the video clip get transfered to the server via ES?



I guess my main question here is, can ES provide service to get images and videos from client to the server with WinForm?



Once you answer, then I'll follow a few more questions depending on the answer.

Thanks!

..ßen
StrataFrame Team
S
StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, you can store anything in a BLOB field... it's probably the recommended way for storing images just because it's easier to manage when it's in the DB than it is if it's out on disk.  However, in a web environment, each image is a separate web request (separate GET) from the client, so you'll need to create an image.aspx page that returns the data.  This page will be a regular aspx page, but cut all of the HTML from it... just leave the <%Page %> declaration at the top.  Then in the Load of the page, you'll need to set the response type within the response object to image/jpeg or whatever MIME type you're returning, and then write the binary contents of the field to the OutputStream of the response. 

There are lots of code samples on Google if you search for returning an image from an aspx page.

That's the way we do it with images stored in the database (you then just set the image.aspx?imageid=pkofimage as the src of the <img> in your content page).

Ben Hayat
Ben Hayat
StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)StrataFrame User (384 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Thanks Ben;



Just found out last night (after posting this question) that the future version of ASP.Net will allow the developer to display an image on an ASP.net page which is already in a binary field, without doing any manipulations. Also, with inclusion of Silverlight components, you can have Rich media (Audio and video) included in the asp.net page.



So, I guess the second part of my question (video clips), might work the same way as image. Just saving it into a BLOB field.



I suppose, I'll create a one-to-one relationship between my AD record (which holds the text data about the AD) and another record that holds images and video. This way, when I'm just going through my AD records in the database server for queries, I don't have to carry the weight of the images.

..ßen
StrataFrame Team
S
StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, it's always good to have the actual BLOB data in a separate/child table because the data can certainly get heavy, and you don't always want to retrieve it...
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search