jquery - How to develop stack overflow like notification system -
There is a good notification system in the stack on the site when we post any question and paste on that page and medieval time In any of the answers or give a comment or edit my question or any other question, a notification message comes in which we click and load the data.
Image
1) Thus can be developed by signal R
2) We can write the JQuery function which will run every section in the background and suppress the server to check whether any answer question Whether or not to check for any existing question change, or to check any comments or not, etc. If any activity is received then the page And the message request for requesting the user to load shown.
But I do not know how the stack overflow has developed this notification system? Therefore, I am looking for the best guidance for developing such information system for any site.
thanks
edit public class ChatHub: Hub {Send Public Zero (String Name, String Message) {Client. all. Message (name, message); }} Code in Global.asax protected Zero Application_Start (Object Sender, EventArgs e) {RouteTable.Routes.MapHubs (); } Client code & lt; Script src = "http://code.jquery.com/jquery-1.8.2.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "script / jquery.signalR-1.0.1.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "signalr / hubs" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Get $ username ($ function () {// proxy on the fly var chat = $ .connection.chatHub; // Get the username and archive the messages to prepaid. $ ('# Displayname'). Val (prompt ('enter Make your name: ',' ')) // Announce a function at the chat hub so that the server chats it.client. sendMessage = function (name, message) {var encodedName = $ (' & lt; div / & gt; ; ') .text (name) .HTML (); var encodedMS = $ (' & lt; div / & gt; ') .text (message) .html (); $ (' # message '). Append (' & Lt; li & gt; '+ EncodedName +': '+ encodedMsg +' & lt; / li & gt; ');}; // Connection Start $ .connection.hub.start (). Done (function () {$ ("# send") .click (function () {// Chat on chat server.send ($ ('# displayname') Call method. Val (), $ ('# msg'). Val ());});});}); & Lt; / Script & gt; Thank you for your guidance and you asked me to use your library but when I went to that page, I did not find any solid code, Have to be in the page. Normally when we work with the signal we wrote the code above. A side hub and on the other side there is a client but I do not know that I need to write to implement your code and I should also know how much your code will provide. Thanks
Pub / All Use to push customers' updates It's easy to do. In reality, this kind of facility takes time to develop rich and real time CMS. Start simple and add features as you go.
Do not vote, use SignalRather instead, I have a concept that StackHowflow uses any type of CQRS domain. In the reading model shop, you can push change in message bus and then send them to customers.
You can check my event aggregator proxy for signaller,
I use a knockout or signal R on the client, but keep in mind If you want to work SEO, then you must also present the content on the server
public class ChatHub: Hub {Send Public Zero (String Name, String Message) {Client. all. Message (name, message); }} Code in Global.asax protected Zero Application_Start (Object Sender, EventArgs e) {RouteTable.Routes.MapHubs (); } Client code & lt; Script src = "http://code.jquery.com/jquery-1.8.2.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "script / jquery.signalR-1.0.1.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "signalr / hubs" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Get $ username ($ function () {// proxy on the fly var chat = $ .connection.chatHub; // Get the username and archive the messages to prepaid. $ ('# Displayname'). Val (prompt ('enter Make your name: ',' ')) // Announce a function at the chat hub so that the server chats it.client. sendMessage = function (name, message) {var encodedName = $ (' & lt; div / & gt; ; ') .text (name) .HTML (); var encodedMS = $ (' & lt; div / & gt; ') .text (message) .html (); $ (' # message '). Append (' & Lt; li & gt; '+ EncodedName +': '+ encodedMsg +' & lt; / li & gt; ');}; // Connection Start $ .connection.hub.start (). Done (function () {$ ("# send") .click (function () {// Chat on chat server.send ($ ('# displayname') Call method. Val (), $ ('# msg'). Val ());});});}); & Lt; / Script & gt; Thank you for your guidance and you asked me to use your library but when I went to that page, I did not find any solid code, Have to be in the page. Normally when we work with the signal we wrote the code above. A side hub and on the other side there is a client but I do not know that I need to write to implement your code and I should also know how much your code will provide. Thanks
Pub / All Use to push customers' updates It's easy to do. In reality, this kind of facility takes time to develop rich and real time CMS. Start simple and add features as you go.
Do not vote, use SignalRather instead, I have a concept that StackHowflow uses any type of CQRS domain. In the reading model shop, you can push change in message bus and then send them to customers.
You can check my event aggregator proxy for signaller,
I use a knockout or signal R on the client, but keep in mind If you want to work SEO, then you must also present the content on the server
Comments
Post a Comment