hi i am coding my website that is an e-learning management system ( i hope ).
my database has different tables like users, Lessons , fields , Files , branches , groups , city , university and ... ( using msSql)
now i need an notification system ( not important to be real time ) to notify users when a new user join or a new branch or... are added to database.
now i want to ask that what is the best way to gather this information and show these info
for example on something like a GridView or DataList.
i decided to create a notification table to save this changes but i think its not a good way.
please help me to chose the best way.
Since you already seem to be in the MS stack I would suggest SignalR to maintain your notifications. That way you can handle notification to anyone that is currently logged on (because real time is usually better for anything collaborative). SignalR has a lot of examples available for implementing updates on your website.
For any users not logged in, simple hold their previous login datetime and send them any updates (you can create a quick view for this info sorted by updatetime) that have happened since their last login.
Hope that at least points you in the right direction.
Related
As a DBA/SQL Server Developer, I'm often asked to produce web pages where users can view the data in the database and edit them, and see the edits they've made straight away (without refreshing the page). I know nothing about ADO.NET or C#, but I would like to be able to give users this very simple functionality. Essentially I'm looking for three things:
to display a table of data in a webpage retrieved from a SQL Server stored procedure
to display a text box in the same webpage where users can input data
to display a button in the webpage that takes the inputted data from the text box, runs it through the stored procedure as a parameter, and refreshes the table.
Ideally I'd like this all to happen without the user having to refresh the webpage.
My questions are: is this kind of thing possible? How difficult is it to achieve? And how do I do it? I don't have the time to learn web development in full. I wouldn't need the vast majority of skills I'd learn even if I did learn it in full. I just really need this basic functionality, to produce ultra simple pages when user requests come in.
If anyone knows of any examples of just this kind of thing, that I can copy, they would be greatly appreciated!
You don't really need to use MVC, WebForms or even C# for that matter. Using one of those would be killing a ant with a rocket launcher.
Look into node.js and pug, using a RESTFUL API to deliver the information you need. I don't believe you will need more than two hours to provide your users with the interface you told us.
Node has a awesome package called express, it sets up everything for you and uses Pug on the starter template.
You can check out a tutorial right here.
Actually it will also take 2 hours doing with Webforms or MVC . I recommend using Entity Framework to make it super simple.
Webforms may be a bit older technology but will be faster to develop this specific page (assuming you only targeting Desktop users). Otherwise MVC is the way to go.
You can Check the tutorial.
https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started
Is it possible to create a "internal" database to use with a UWP?
So when i publish the app it comes with the db, because there is no need for me to use a db on lets say Azure.
In the app i show movies and the user can store a movie to favorites. So I only need to store the index number from that movie to use next time a user navigate to the favorites.
Or maybe there is a better way, like a text file?
I cant find any information regarding this and a tip would be much appreciated! :D
It seems like you have solved your case by using a text file instead of a db.
For the sake of detail :
If the text file doesn't meet your criteria further on you should probably use Sqlite. There's a preview version currently in development.
For more details :
https://stackoverflow.com/a/30001048/4487530
development of my app has finished, but I want to have general information about my app users.
How can I know they are from which Store/country? store/country-specific downloads
How can I know which languages they are using for focusing on it more.
Will such these informations appear on the dev center or I should have my own server for receiving these information?
Which codes I need, where can I start?
I know I can use device location, but I don't want to use this option
(sorry I couldn't find anything useful by searching)
Update I don't want these informations locally (providing it to the user himself) But I want to know who are my users after sending it to the store.
How can I know they are from which Store/country? store/country-specific downloads
That information is already available in the Store statistics
How can I know which languages they are using for focusing on it more.
Read the Thread.CurrentCulture and Thread.CurrentUICulture , if you want to know what local language/culture the user is user.
The store is bound to the country specified for the users live account.
I am developing a web application which will deal with online examination. The requirement is:
There can be n-number of sections in
an exam and admin users should be
able to create questions/answers and
add to an exam.
The questions should be displayed
for a certain amount of time in the
browser with timeclock and it should
move to next question automatically.
User should not be allowed to open any other instance of the browser or login from another IP if the exam is in progress.
I am seeking community vote of how would someone design the application to meet all these criterias? What patterns should be used? What components can help to reduce the development time etc..
My technology stack is C#, ASP.NET MVC or ASP.NET with SQL Server.
Thanks in advance!!!
Rather than re-invent the wheel, you should look at a solution such as the Open Source DotNetNuke and either buy/build an extension for the portion specific to your scenario.
I think for the user app, you should consider a Silverlight app as this will give you granular and secure control over the experience.
Overall the solution would be like this:
DotNetNuke provides the foundation portal/Content Management so you can create a highly customized experience around the exam experience including support for user management etc.
The DotNetNuke extension would enable authorized administrators to manage exams and exam questions.
A webservice wrapper would provide access to the business controller used by the DotNetNuke extension.
A Silverlight app would interact with the webservice to enable authenticated users to take their exams
Overall, such a solution would give you a high degree of control over the user experience while enabling you to focus time/resources that are only specific to your situation while leveraging an existing, robust and popular solution on which to build your solution.
(Full disclosure: I am one of the co-founders of the company that manages DotNetNuke. In fairness, you can replace my suggestion for DotNetNuke with Orchard or Umbraco and the solution would be equally valid.)
For the Database side of things you would want something like:
Table Exams (ExamID, ExamName) //to hold all exams
Table Users(UserID, Username, Login, Password) //to hold all users
Table OpenExams(Exam_ID, User_ID) //to hold open exams
Table ExamSections(SectionID, Exam_ID, SectionName) //to hold sections of exams
Table Questions(QuestionID, Section_ID, QuestionName, Question, Answer) //to hold questions
This of course at its most basic and only 1 approach of many. You would need to add fields where required.
As for item 2, i would probably do it in the application layer (or in VS). I dont have much experience in web dev, but i would think that ASP could handle that. For item 3, you could run a simple SQl statement to get if the user trying to access the exam is currently taking the exam.
Lets also start mapping the processes:
User:
1. User logs in (to prevent multiple exams by one user).
2. User "starts" an exam -> Time is noted on the server-side and timer triggered on client-side. User gets a dynamic exam page 1.
3. User is done with page 1, clicks next -> Ajax-reloading the page content (the questions part). Timer for page 2 is started (server and client side)
3.a) detected login from a different IP - session broken, user marked as cheater :) or the login is simply rejected.
User times out on page 2 -> the page content (answers) are automatically submited. the timers are set for page 3. user gets page 3.
User clicks finish -> the exam is finished.
Admin:
Logs in -> show "add exam" option and table of existing exams
Adds an exam - open "exam page", add a new "exam" entity
Adds a page - > new "page" entity added to this exam, questions table is loaded in the gui
adds a question -> new "question" object added to page
end page -> the page is saved. options for end exam or add page are here.
add page -> go to step 3
finish exam -> save exam
optionally mark exam as "active/inactive"
add tables with "students" and their results and stuff like that.
This needs a lot of work, but when you have this you have the idea of what you need to put in your design.
I am building a new website, which you can see at http://www.kristalcapljina.99k.org.
While I have some web design experience, I need help in knowing what I should research to add some specific functionality to the site.
The first bit I want to add is an area where business owners can list their business' information, such as the address or contact information. They should also be able to login later to change the information. I assume this will need some sort of database, but don't know where to begin looking.
Second, I wish to add a map that highlights the locations of these businesses.
Any help direction you can give me to get started would be most appreciated.
You want to embed a Google Map onto your site, using the Google Maps API.