Click to See Complete Forum and Search --> : Advice
r000t
Apr 16th, 2010, 03:51 AM
Hi,
So I'm in the process of creating a eLearn application (as you may probably tell by the number of threads i've started these couple of weeks), and I need some advice.
Part of the application requirements, is the ability to revise and study certain topics/courses. As such, there is a lot of media that has to be stored such as text/images/flash files for use with the application. Now at first, I though it's just a matter of saving these in a database along with the paths to images/flash etc. but then I thought there may be other beneficial ways to manage this. Such as creating numerous PDF's with the course materials in then simply embedding them onto the application. There's probably a lot more ways that this could be done.
So basically, I'm just asking for your advice. If this was your project, how would you go about it?
P.S Listing a couple of benefits/drawbacks of your method would be greatly appreciated.
Hack
Apr 16th, 2010, 06:13 AM
Moved To General Developer
NeedSomeAnswers
Apr 16th, 2010, 06:26 AM
Such as creating numerous PDF's with the course materials in then simply embedding them onto the application.
Surely this would bloat your application size somewhat, also i don't know what other people think but i cant see any real benefit of embedding the data.
One main drawback of this would be every time the course materials change, you will have to release a new version of your app, rather then just push out the updated materials.
FunkyDexter
Apr 16th, 2010, 07:18 AM
I agree with NSA, I can't see any benefit to embedding and I can see some massive drawbacks (the inability to change the material afterward is a heeeuge consideration). Generally we started separating data storage from functionality some time back in the eighties and I haven't seen anything yet to indicate that was a bad decision.
Personally I think your original idea was right: Store data in a database. That is, after all, what they're for. And don't forget, you can store your pdfs in the database, just use a blob field (that's SQLServer, not sure what the equivalent in other DBs is).
r000t
Apr 16th, 2010, 09:59 AM
Surely this would bloat your application size somewhat, also i don't know what other people think but i cant see any real benefit of embedding the data.
One main drawback of this would be every time the course materials change, you will have to release a new version of your app, rather then just push out the updated materials.
Hello,
If I were to go down the embedding route, I don't think i'd ever run into the problem your talking about.
I have a 'backend' on the eLearn application which staff/course operators can login and change information on a particular topic/and or couse. I'm in the process of allowing the course content to be managed also. If i were to work with the PDF's, i'd simple make it so the staff member selects a PDF file which holds the course content, copy the file to the application dir, then save the path to a database. Then when i comes to the student logging in and access the course material, the embed source would simply be the path in the database. This would eliminate the problem of releasing new versions when the course changed - it's just a matter of changing the PDF file in the staff backend.
I'm thinking that storing the actual PDF files in the database itself, would just make it huge and inefficient.
What do you think about doing it this way?
NeedSomeAnswers
Apr 16th, 2010, 10:51 AM
If I were to go down the embedding route, I don't think i'd ever run into the problem your talking about.
Right so what your saying is you want to embed your PDF's but then after you install when a staff member selects a PDF you are going to move them to a network location and copy the path to a database so that they are not embedded !!?? why ?
What i would do is not embed at all and just set your installer up to copy the PDF's to the network location and the paths to the database on install, therefore negating the need to embed anything and saving you a lot of bother.
I still don't understand your reasons for wanting to embed ? what advantage do you think you will get from this approach !!!!????
I'm thinking that storing the actual PDF files in the database itself, would just make it huge and inefficient.
Personally i would just store the path to the PDF's in the DB, and store the files on a server.
r000t
Apr 16th, 2010, 10:59 AM
Personally i would just store the path to the PDF's in the DB, and store the files on a server.
That's exactly what I said I was going to do :p
I still don't understand your reasons for wanting to embed ? what advantage do you think you will get from this approach !!!!????
When students login to study a course, they will need to view the materials (PDF Files). By embedding the PDF on a form of such, I can integrate other 'study tools' that i have created that will facilitate the studying.
FunkyDexter
Apr 16th, 2010, 11:47 AM
I think we're talking at cross purposes with the word embed.
NSA and I take that to mean you will make the pdfs part of the project itself; If you do that your staff won't be able to change them later and that's whyNSA and I are arguing against it.
You, on the other hand seem to be saying you'll still keep the pdfs separate but you'll embed a link to them in your app as well as some kind of viewing control. That's fine and I don't think either of us would argue against it as an aproach. The only pointI would offer against it is that, if you want to change the structre of you document set (nb not the structure of an individual document but rather the structure that surrrounds the entire collection, e.g. adding a new course with all the documents assosciated with it) you won't be able to do that without a recompile. Moving the links/documents into a DB instead of embedding them would allow you to do so without a recompile. If that circumstance isn't going to come up for you then it's a moot point.
On whether you should store the actual docs in the DB or links to them, that depends. There's pros and cons to either aproach:-
Space isn't an issue; the document will take up exactly the same amount of space on disk as it will in the DB - the only difference is that with links you can put the docs on a different disk or server which means you reduce resource contention a bit. On the other hand it means recovering those docs as a separate operation (possibly accross a network) which is extra overhead.
Storing links means you need to account for the fact that a document may be moved or deleted from outside you app and that means you need to code for the contingency that a document may not be where you expect it to be. On the other hand, having the docs on disk with links stored to them means you can ammend the documents from outside your app and you may find that flexibility useful.
In the end, which model you go for is a personal choice. Personally I prefer having the docs in the database because it's more robust but I wouldn't argue that either aproach is 'right' or 'wrong'.
BTW I used to work for a company called Hamlet who wrote an examinations software package called FAIM. We didn't really do e-learning but the system did allow users to design exam papers and then print them out to send to examination centres. From the point of view of users maintining a document and other users being able to read it, I think that's exactly the same as you're doing really. We actually used Word as a medium and structured the ext, tables, titles etc as individual word objects - so each exam question was actually made up of several objects which we would then reconstruct into a word document when someone wanted to view or print it. This aproach was great because it allowed users to not only build up an exam from a reusable set of questions but also build up a question from a set of reusable components, e.g. in a multiple choice they might use the same set of possible answers in several questions, or a different set of possible answers in deifferent versions of the same question. This was a highly flexiible aproach that was alot of work to create in the first place but was worth it for the pay-off it gave our customers.
r000t
Apr 16th, 2010, 12:10 PM
Thanks for your reply,
You, on the other hand seem to be saying you'll still keep the pdfs separate but you'll embed a link to them in your app as well as some kind of viewing control.
By the term 'embedd' I mean display the PDF file on a form using the Adobe Reader control. Like this:
http://i42.tinypic.com/2zfq25z.png
NSA and I take that to mean you will make the pdfs part of the project itself; If you do that your staff won't be able to change them later and that's whyNSA and I are arguing against it.
The changing of course materials can still be done inside the application itself. To edit the content, the staff will need to specify a revised PDF document using the OpenFileDialog(). Then the path to the new file will be updated in the database. So when the student logs in and studies a course the Adobe Reader will use this new path in the database to display the content to the student. So a re-build of the application will not be needed.
By using the AdobeReader control, it gives me Adobe Reader controls such as Print, Zoom etc. So I won't have to worry about that.
We actually used Word as a medium and structured the ext, tables, titles etc as individual word objects - so each exam question was actually made up of several objects which we would then reconstruct into a word document when someone wanted to view or print it. This aproach was great because it allowed users to not only build up an exam from a reusable set of questions but also build up a question from a set of reusable components, e.g. in a multiple choice they might use the same set of possible answers in several questions, or a different set of possible answers in deifferent versions of the same question. This was a highly flexiible aproach that was alot of work to create in the first place but was worth it for the pay-off it gave our customers.
This approach may come in handy when I come to developing the examination part of the application, thanks.
The reason why i didn't want to store the actual PDF document in the database itself is because I don't know how to actually use in in conjunction with the AdobeReader control which is why i started another thread in the Visual Basic.Net forum.
Thanks for help and advice :thumb:
GaryMazzone
Apr 16th, 2010, 12:15 PM
Basicly you save the varbinary data back out to a file on disk and read from there.
gmiller
May 4th, 2010, 02:10 AM
Hi Dear,
first of all i will select topics on which I want to provide eLearning. Then I willl start building website. In your website you should always update the content of your study material.
NeedSomeAnswers
May 4th, 2010, 03:47 AM
I think we're talking at cross purposes with the word embed.
By the term 'embedd' I mean display the PDF file on a form using the Adobe Reader control. Like this:
Aha, that is not Embedding the documents in your app, but rather the Adobe Reader control, hence the confusion.
As FD said above that's perfectly fine, now i understand what you doing you basically seem to have the right approach, you just confused us with the Embedding PDF's bit.
PDF's are the actual documents, if you had said "i am embedding the Adobe Reader control in my application" we might have understood better :D
r000t
May 4th, 2010, 04:08 AM
Aha, that is not Embedding the documents in your app, but rather the Adobe Reader control, hence the confusion.
As FD said above that's perfectly fine, now i understand what you doing you basically seem to have the right approach, you just confused us with the Embedding PDF's bit.
PDF's are the actual documents, if you had said "i am embedding the Adobe Reader control in my application" we might have understood better :D
Ah right, sorry for the confusion :confused:
Btw, is there any good examples you know of that show you how to save files in a MDB database?
Thanks.
Hi Dear,
first of all i will select topics on which I want to provide eLearning. Then I willl start building website. In your website you should always update the content of your study material.
Wth?
NeedSomeAnswers
May 4th, 2010, 08:16 AM
Btw, is there any good examples you know of that show you how to save files in a MDB database?
does this mean that you are using Access ? because if you are i would advise against trying to save your PDf's actually into your database, in fact i am not even sure you can, does Access have a Blob field type ? maybe "Mr Funky" as i once saw someone call him :D or someone else can answer that one.
On another note, is there any reason that you are using Access instead of SQL Server Express Edition ?
GaryMazzone
May 4th, 2010, 08:23 AM
The data could be saved in access as OLE type (binary data).... The question should be asked is this a good idea and the answer would be not it is not. This will increase the size of the database dramatically and will get beyond Access size constraints pretty quickly.
r000t
May 4th, 2010, 08:30 AM
Meh, i'm not bothered about that. It's only going to be 3-4 PDF files maximum and it's too late to change to SQL (There's other reasons why I started using Access instead of SQL at the start).
The question that still lies now, is how I actually save PDF into a OLE Type field and then read them back out again in order to use the file in a Adobe Reader control on my form :$
</Visual Basic Skills> This is where i'm stuck.
GaryMazzone
May 4th, 2010, 08:44 AM
Did you search the forum?
* Save File To Database http://www.vbforums.com/showthread.php?t=335207
* Extract File From Database http://www.vbforums.com/showthread.php?t=346752
r000t
May 4th, 2010, 09:06 AM
Yes i have, and all the threads are referring to images, not PDF's.
GaryMazzone
May 4th, 2010, 09:09 AM
They are the same thing.... A binary file is a binary file... change the ending tag to .pdf and every thing else is the same
r000t
May 4th, 2010, 09:16 AM
Hm, some deal with just images directly.
Also, the code that RhinoBull posted isn't VB.Net :(
si_the_geek
May 4th, 2010, 09:18 AM
In that case take a look at the "VB.Net" section of our Database Development FAQs/Tutorials (at the top of the Database Development forum)
NeedSomeAnswers
May 4th, 2010, 09:25 AM
There's other reasons why I started using Access instead of SQL at the start
I would be interested to know what those reasons are.
I know there is the "i have no choice it been forced upon me" reason but i would be interested to know if there is any other valid reason for choosing Access over SQL Server Express for a new project ?
r000t
May 4th, 2010, 09:44 AM
...I know there is the "i have no choice it been forced upon me" reason...
Got it in 1 ;)
r000t
May 4th, 2010, 09:45 AM
In that case take a look at the "VB.Net" section of our Database Development FAQs/Tutorials (at the top of the Database Development forum)
Didn't try looking there. Ty
Shaggy Hiker
May 4th, 2010, 10:57 AM
By the way, if by Access you mean .mdb files, be sure to test on 64 bit systems, as your code might break....or it might not....I'm still testing that.
formlesstree4
May 4th, 2010, 02:06 PM
@SH: If you force compile the app to run WOW, it shouldn't break. I had done some testing on that myself.
si_the_geek
May 4th, 2010, 02:14 PM
While forcing your app to be 32 bit (x86) enables the database side of things to work, it can cause issues in other areas - so unfortunately it is app dependent on whether it is valid.
Thankfully the new version of the ACE driver will run in 64 bit mode, but it is still in Beta.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.