|
|
Comments and Discussions
|
|
 |
|
|
|

|
I was really interested of your Online Demo. Can you post the code of that page?
Thanks
MaiO
|
|
|
|

|
Its the same code which is in the download, i have added pictures just for display
Raj
|
|
|
|

|
see the subject
regards
Stephan
\\\| \\ - - ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| <a href=http:| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|

|
thanks for the message i have fixed the link
|
|
|
|

|
I suggest to add a javascript preloader for the images. If one has a slow connection, one has to wait a while until the stars popup.
|
|
|
|

|
thats a good idea
thanks for the message
|
|
|
|

|
Hi
i have downlaoded the sourced code, connected it to a database. But i am not able to run it. It thorw error everytime i try to run it.
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
please help me wid this
|
|
|
|

|
create a new Web project in VS2003 and name it Rating ok? that way it will configure the virtual directory etc
And then copy all the files from source code and include it in the project
then run it should work.
Raj
Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA | Ajax Rating | ExplorerTree
|
|
|
|

|
i did the same thing
first i download the code
n added to a new website in asp.net
connected to database
create virtual directory in IIS
but it say that some machinetoapplication error is there in web.config and point to the line where authentication tag is places
can u please help me with that
|
|
|
|

|
check here[^]
if you just play around things a bit more ,i am sure you are very close and you will get it
Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA | Ajax Rating | ExplorerTree
|
|
|
|

|
Thankx a lot
That helped a lot
finally i was able to run the app
i think u have provided the best documentation on ajax based rating system on net.
But still i have a prob
i cant see any image n rating thing there
when i open photo.aspx, all i see is a image saying AJAX RATING SYSTEM and a link to photoall.aspx
thats it.
can u please get me running
|
|
|
|

|
hey i just rated a full 5 for ur article
but the link to rating is lost in the huge content of the page
do somethin for that man u'll get many 5's
|
|
|
|

|
thanks once again,
you also might want to see universal database administrator here[^]
Since you are dealing with databse tables you will find it quite useful
thanks
Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA | Ajax Rating | ExplorerTree
|
|
|
|

|
Hey there
thanks for the evaluation
images and other fields in the table is just for showing, how you can display it. If you have a field with image you can display it there.
Rating Module just need 2 main fields RatedBy (number of Users) and Score
along with the primary key ID, Title field is also for demo purpose
so if you have more fields in the database say an image field with image link you can display that also but you need the code to display the image
like image tag with src =imagefield value.
if you have made the table correctly (as mentioned above)
add 4-5 records to them then only it will work
happy learning
Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA | Ajax Rating | ExplorerTree
|
|
|
|

|
thanx a lot
now i got it working
although some prob is still there with the UI but i think i need to explore things before i fully understand it.
I wanted to used just the small part of it , just the ajax thing, but i think the code is too big.
Can you tell me how to trim the code?
|
|
|
|

|
if you want to trim the code, just try to run the photo.aspx first
if everything is alright photo.aspx will run properly, then you might want to test with others
thanks
Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA | Ajax Rating | ExplorerTree
|
|
|
|

|
..I'd use an existing AJAX routine so you can concentrate on the server-side code.
http://www.dynamicdrive.com/dynamicindex17/ajaxroutine.htm[^]
That is what I use in my apps and it works wonderfully well.
Very simple to implement too.
And it keeps my HTML nice and tidy.
Very useful article.
Thank You!
|
|
|
|

|
Very true , i also think, that knowing the basics of JS and ajax will be of help
even if we do use an exisitng ajax routine like ajaxpack or BACKBASE (suggested by Frederic Sivignon )
its like creatng a user control from scratch with respect to using an existing well tested user control.
more control with the former and fast development with the latter.
and thanks for your comment
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|

|
Thanks for a very nice article.
You know that something is becoming popular when you have fake versions of it going around the community. check this out. [Fake AJAX]
Kirtan
|
|
|
|

|
Thanks for your comment
Fake ajax, its actually HTML GUI IE specific transition effect and nothing else
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|

|
I assume most online rating systems take the average of a bunch of votes. While there is obviously a statistical basis for determining error based on sample size and population size, would eliminating extremes for low samples increase or descrease the error? For example: we have all seen a book on amazon for which the author or some agent gives himself 5 stars while everyone else votes crap. Or the opposite when a novice users buys a book clearly marked for experts and penalizing them with a 1 star when the rest are fives.
"Until the day of his death, no man can be sure of his courage" -- Jean Anouilh
|
|
|
|

|
Ennis Ray Lynch, Jr. wrote: most online rating systems take the average of a bunch of votes
Most of them do, but some sites (even Code Project) do a weighted rating (platinum member votes counts more than a bronze member) so a novice user cannot effect the statistics much. I think that is a good way to do it.
Ennis Ray Lynch, Jr. wrote: would eliminating extremes for low samples increase or descrease the error?
IMO, increase the error (if it is a sample) but if it is the whole population which is small if you remove the extremes chances are that it will decrease the error.
Like in Amazon, there are extreme votes which effects the overall average but, But there is more to it
what happens is , When somebody give a 5 star vote to a crappy book , that starts a repulsive reaction to more users, who have read that book and they make sure to vote it and that compensates the average vote. And the vice versa. In the long run everything evens out.
So buyer should be beware of items which has low votes because there is no way to tell whether they are all genuine, though if a book has more votes say above 50 votes then , you can be sure that avg will be pretty much accurate.
Its well said: 33 percent of all statistics is made up
And thanks for your comment
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|

|
You point out that you need to refresh the page in order to get the data using iFrames, which is not true, since this is exactly what I do. It does require a bit more coding than the XMLRequestObject way, but it seems to work fairly good for me. Here's a quick example of how to do it: [ script.js ] var ids = [] function CallIt(){ 'first create the iframe to host the call var iframe = document.createElement("iframe"); iframe.setAttribute('id', 'ajaxRequest.' + this.counter); iframe.setAttribute('name', 'ajaxRequest.' + this.counter); iframe.setAttribute('scrolling', fScrolling); iframe.setAttribute('frameBorder', fBorder); iframe.setAttribute('height', fSize); iframe.setAttribute('width', fSize); iframe.setAttribute('src',''); iframe.src = 'AjaxRequest.aspx?id=' + iframe.id + '&class=BobsWorld&method=SayHello'; ids[iframe.id] = iframe; document.body.appendChild(iframe); } function Callback(id,data){ document.body.removeChild(ids[id]); document.getElementById('test_input').value = data; }
[ AjaxRequest.aspx VB.Net ] Function Page_Load() Dim iFrameID As String = Request.QueryString("id") Dim ClassName As String = Request.QueryString("id") Dim MethodName As String = Request.QueryString("id") Dim NewType As Type = Type.GetType(ClassName) Dim returnData As String returnData = NewType.InvokeMember(MethodName, Reflection.BindingFlags.InvokeMethod, Nothing, Nothing, Nothing) Page.RegisterStartupScript("AJAX","<script>callback('" & iFrameID & "','" & returnData & "')</script>") End Function
[ BobsWorld.aspx ] Function SayHello() return "Hello World" End Function
So with the example code above, which I just threw together so I don't guarantee it actually works, the AjaxRequest.aspx will need to include the "script.js" files as well as what ever page is calling the "callIt()" javascript method. The main reason I went the iFrame route is because, at least what what little I know, it's better support across different browsers than the XMLRequestObject is... but of course I could be wrong. drofnas
|
|
|
|

|
Hey drofnas,
First of all a BIG THANKS for the review of the article and pointing out, the way to enhance the iframe way.
By pros and cons in Amazon/ Ajax way i meant specifically for the rating module in hand, and not IFrames and Ajax in general.
If you look it closely when you rate a record , the total score and rating is not updated in amazon way without refresh,
while in ajax it does instantly.
Javascript is definetly powerful enough to eliminate those limitation even using the IFrames.
I am working on some of the security issue as reported by a few of the user and will definetly look forward to improve the application
furthur.
thanks once again
-------------------------------------------------------------
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|
|

|
Thanks for your comment
i wish, i would have found you earlier (will fix it)
That also warns us about the vulnerability aspect of ajax
-------------------------------------------------------------
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|

|
Quartz... wrote: That also warns us about the vulnerability aspect of ajax with javascript
Or any form input for that matter
|
|
|
|

|
Same input problem. I can run the app fine. Waiting for a fix.
Great article BTW. Keep up the good work.
Thanks,
HyperX.
|
|
|
|

|
FIXED:
Added the bounds check and some server side validation in the source code (updated the online demo)
A brief discussion too on security.
Let me know what you think about this.
thanks for the suggestion
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|

|
Added the bounds check and some server side validation in the source code (updated the online demo) A brief discussion too on security.
Let me know if you get any ideas on improving this
thanks
-------------------------------------------------------------
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
-- modified at 18:39 Tuesday 30th May, 2006
|
|
|
|

|
Don't forget that a lot of free AJAX library exist today. And these libraries remove the necessity to write the code you provide in your article, and also ensure the compatibility with most browsers:
* No necessity to take care about XMLHttpRequest object and connection management
* No need to write Javascript (as it is automatically generated by the library). Or just a minimum.
|
|
|
|

|
Hey Frederic
First of all, thanks for the comment.
You are right, a lot of ajax libraries/applications are there which even creates the needed javascript.
But i think Ajax right now is in the initial stages though with lot of hypes. these application also are in
there initial releases. I myself am playing around with MS Atlas right now.
I prefered working directly with the XMLHttpRequest Object or Javascript because it
gives complete control on the application and let me do the work i need, rather than trying to understand how some tool has created it.
Though i will definetly look forward for ways to furthur optimize this. do add me a link/note if you find something to improve this.
thanks again
-------------------------------------------------------------
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA ^
|
|
|
|

|
Hello,
Yes, I understand your point of view.
But some AJAX libraries give you so much features, that it is quite difficult to have the same things in your application, if you decide to code everything.
For example, some AJAX libraries allow you to share C# object in the server side with Javascript objects in the client side (with a full HTTP serialization system). It is fantastic to help you to code Javascript, as you write a class in C#, create an instance of this class on the server, and you retrieve exactly the same "copy" of this instance in Javascript (for data of course, not class methods) without writing any line of code! I let you imagine the time gain in developement point of view and "progamming logic" you can put in your software (AJAX.NET professionnal allow this very easily... and it is free!).
Also writting a full AJAX control can take a long time and can be very painful when you want to support all browsers (for example list view, combo box that can be dynamically populated with AJAX method).
For example, look at this library (free for non commercial use): BACKBASE. And imagine the huge job if you want to provide so complex and user friendly controls by coding it yourself!
But the very good point of your method and example, is that it can help every body to understand what is AJAX exactly. And so, use these libraries in a better way in future.
(and sorry for my poor English... )
-- modified at 12:15 Sunday 28th May, 2006
|
|
|
|

|
Frederic Sivignon wrote: BACKBASE.
Wow! Very pretty!
|
|
|
|

|
Frederic Sivignon wrote: BACKBASE. And imagine the huge job if you want to provide so complex and user friendly controls by coding it yourself!
BACKBASE is awesome, thanks for sharing i think atlas is also providing a toolkit for the same
and never think about English, its the message which you wanna send across, which is important.
Cheers
Raj
-------------------------------------------------------------
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Shameless selfplug: Universal DBA | Ajax Rating
|
|
|
|

|
Being on the fringes of web development, it's nice to keep up with the latest trends, good article.
Never send a human to do a machine's job Agent Smith
|
|
|
|

|
Thanks made my day
-------------------------------------------------------------
Rule # 17: Omit Needless Words - Strunk, William, Jr.
-------------------------------------------------------------
Universal DBA
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
Ever wondered, how the amazon rating system works with multiple items in the same page, here is a simple article to describe the basic bare bones needed to create an asynchronous rating module using ASP.NET , SQL Server and ..... AJAX
| Type | Article |
| Licence | CPOL |
| First Posted | 25 May 2006 |
| Views | 119,158 |
| Downloads | 1,031 |
| Bookmarked | 135 times |
|
|