justderb / texttoshare Goto Github PK
View Code? Open in Web Editor NEWNO LONGER MAINTAINED | COM S 430 Project
NO LONGER MAINTAINED | COM S 430 Project
Steps to be done:
Currently, the UserDAO
does not store any password information for a user. If the backend creates a new UserDAO
object and tries to add this user to the database, there will be exceptions thrown, since currently the users.password
column does not accept NULL values.
Need to handle passwords somehow so the database doesn't error like this.
Add a check for this, and issue #39 should alleviate this issue also.
Add isSystem
column to Plugins
table. Error
, Help
, ListPlugins
are system plugins and should be hidden (or cannot be disabled) from the website.
While beginning adding information and layout changes to the Index.aspx
page, I've found that the Session
variable is not maintaining data between pages. The RegisterUser.aspx
page or Login.aspx
pages are not saving this for the Index.aspx
page to grab additional user information for displaying. Need to look into this further.
Need to implement CreationExceptions
within the SqlController
class when null objects are attempted returned.
Need to create an Enum for storing different types of messages such as Stop, Suppress, Error and ValidMessage
. The ParsedMessage
class will set this based on the type of message that is parsed. This will allow for easier checking by the PluginLibrary
to determine what kind of message needs to be sent.
Look into it, Gmail times out and doesn't accept the mail message.
sending SUPPRESS ON grabs the command Supress, ignores the arguments and returns NO_GROUP for the MessageContentType
sending STOP returns invalid command for MessageContentType
Need to add business logic for handling registering users where they enter in a verification code to correctly add their phone information into the database. Need to add associated database methods for accessing the information, as well as a new column in the users
table for storing the specific verification code.
All of the code behind for our webpages should be in .aspx.cs files now if they aren't alrady. The corresponding .cs files that we were originally using can then be deleted to prevent future confusion.
Sub-issue of #6
Currently, the PluginLibrary
has an instance variable _PluginList
that is not being accessed correctly with its corresponding property. This needs to be fixed so the getter/setter is used properly and the property is accessed rather than the _PluginList
itself.
See
texttoshare/t2sBackend/t2sBackend/PluginLibrary.cs
Lines 19 to 30 in 1e6d822
SQL exception. The parameterized query '(@name nvarchar(4),@description nvarchar(4000),@disabled int,@ve' expects the parameter '@description', which was not supplied. is thrown when trying to create a plugin
Implement BackgroundWorkers into a pool
To make it easier to avoid duplicates, the GroupDAO.Users
and GroupDAO.Moderators
should be a HashSet<UserDAO>
When a user registers, we do not know their "phone email". This is the way we will get it without the user knowing exactly what it is and also use it to verify themselves. So these are the steps you will need to follow:
register
system plugin.UserDAO
sent the user email correctly and update it in the database. Else, if it throws a CouldNotFindException
, do nothing.Need to ALTER the sp_deleteUser
stored procedure; currently, it errors as it "can't find the table [dbo].groupmembers".
We need another int
column that holds the number of times the plugin trows an exception so that bad plugins can be safely 'shutdown' system-wide until fixed.
t2sBackend.exe!t2sBackend.MessageParser.Parse(t2sBackend.Message message, t2sBackend.IDBController controller) Line 27
t2sBackend.exe!t2sBackend.MessageController.Watcher_RecievedMessage(object sender, t2sBackend.AWatcherService.WatcherServiceEventArgs e) Line 36 + 0x21 bytes
t2sBackend.exe!t2sBackend.AWatcherService.OnRecievedMessage(t2sBackend.AWatcherService.WatcherServiceEventArgs e) Line 26 + 0x11 bytes
t2sBackend.exe!t2sBackend.GMailWatcherService.recievedMessage(uint MessageUID) Line 153 + 0xe bytes
t2sBackend.exe!t2sBackend.GMailWatcherService.Start() Line 126 + 0xb bytes
t2sBackend.exe!t2sBackend.Program.Main(string[] args) Line 29 + 0xb bytes
[External Code]
Message sent:
This is a bad message
Throws an ArgumentOutOfRangeException
Since the regex matcher doesn't find anything it returns an array of length 0. Accessing the zero-ith index throws this exception.
See unit tests (MessageParserTest
) for various failed tests.
https://github.com/JustDerb/texttoshare/blob/master/t2sBackend/t2sBackendTest/MessageParserTest.cs
First to CSS blocks need to be deleted
We don't want another MySpace explosion and 20 minute load times, which play some music from a band in the 90's that we all can reminisce about.
Upload to Google Docs
Need to validate all forms by checking content and length.
When checking user input, use the string.IsNullOrWhiteSpace(value)
method to ensure they aren't entering null, empty strings or whitespace for their entries.
Each DAO has static readonly int
s that store the max length the database allows, so check that the user-inputed values are >=
the readonly values.
For UserDAO.UserID:
Should this actually be a nullable type (int?) instead? If a user is created within, say, the PluginLibrary, the UserID will be unknown as it is created upon insertion into the database. This issue could also be extended to GroupDAO.GroupID.
For UserDAO.PhoneNumber:
The database currently stores the phone number as an "int", whereas the UserDAO object stores it as a "string". Should we have the UserDAO.PhoneNumber property and related code work with integers or strings?
We need to have private setters on all DAO primary IDs, to avoid them being changed in the objects and causing insert/update conflicts with existing records in the database.
PluginDAO and GroupDAO have references to their owners--PluginDAO only stores the OwnerID, whereas GroupDAO stores the UserDAO object of the owner. I'm thinking that this should be simplified so that both only store the OwnerID. With this, do we want these to both have private setters as well? If this is the case, and a group/plugin changes ownership hands (since there are FK constraints in the database, meaning they have to match between ownerID and userID), there isn't a clean way to handle this code-wise.
Warning: (But may result in unexpected output)
The result of the expression is always 'false' since a value of type 'int' is never equal to 'null' of type 'int?'
See in SQLController.cs
:
The code in question:
null == group.GroupID
GetAllUsers()
should return a list of userDAO
s.
GetAllPlugins()
should return a list of pluginDAO
s.
Add a column in plugins
called attempts_failed
that incrementally adds to the plugin entry. Add methods to the SqlController to:
Add a table extras
with columns key_entry
and value_entry
, both NVARCHAR(MAX). First tuple should include plugin_threshold
=> 20
.
Add a static class of static const/readonly strings that reference the key_entry
column.
Add getValue(string key_entry) and setValue(string key_entry, string value_entry) in SqlController.
Any pages that use a GET
-based redirect need to make sure their values are run through HttpUtility.UrlEncode(value)
as well.
Any current IPlugin
implementations (such as PluginError
) need to be updated to work with the new PluginDAO
object added to IPlugin
.
NOTE: A plugin's command text is currently equivalent to PluginDAO.Name
. In the future, we may need to change the structure (for readability) so PluginDAO
contains:
PluginDAO.Name
: The name of the plugin.PluginDAO.Command
: The command that is texted to the system.The IPlugin.run
function is called and surrounded by a try...catch
when an exception is throw, this should catch it, log it, then increment the error count for the plugin.
If the error count goes above a certain threshold (which should be defined in the PluginLibrary
as a public readonly int
)
Make a getter method that returns a ReadOnlyDictionary
of all Carriers in the PhoneCarrier
class.
Need to write a large set of tests around various user input to check that the MessageParser
utility correctly grabs inputs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.