Finding words in the dictionary used to be tedious and slow!
Now, its fast, easy and fun!
autocomplete lets you easily find words in the english dictionary!
Learning how to build full-stack single-page apps can be laborious when the example app isn't particularly interesing/engaging, Word Finder is an ultra-simple app that will teach you full-stack test-driven-development using (only) core node.js modules on the backend and basic JQuery on the front-end (no fancy frameworks)
A great (search) word finder (user experience) always starts with autocomplete. Then when the person clicks/taps on the word they want the definition for, we show them the definition fast!
Insert links to Heroku examples + screenshots here once FAC5 have completed their projects! :wink:
git clone https://github.com/docdis/autocomplete.git && cd autocomplete
npm install
npm test
npm run nodemon
ac.findWords
method as an API endpoint /find/:wordIn your module (index.js)
callback(err, definition)
when you call it in the following way: ac.define(word, callaback)
ac.define
method to request a word definition from Wiktionary API (requires google skillz! - document your finding!!)
Hint: http://www.mediawiki.org/wiki/API:Tutorial + http://stackoverflow.com/questions/4175533/wikionary-api-meaning-of-words (note: you will need to put your thinking cap on for this challenge!)
[ ] Wireframe a great word searching user experience!
[ ] Using the knowledge of QUnit for front-end TDD you gained in the last two weeks, build great user experience for searching words! (tip: you can build ("fake") the front-end (look-and-feel) while your back-end colleagues are building the endpoint(s) ...)
[ ] Display a stats (searches) for the words people have looked up in an intuitive and creative way!
Note: even though you are running nodemon you still may not see the latest changes in your browser when you refresh the page... sometimes you might need to completely re-start the server
npm run nodemon
to get the page to completely refresh ...
see: https://github.com/dwyl/repo-badges
Ask @Neats29 for help if you get stuck!
e.g: Search for Tweets based on the word the person looked up! or pictures on instagram, or news articles, etc.
Figure out a creative way of displaying this content without making it look cluttered or out of place. (as always, #MobileFirst #FTW)
Returning words that start with the characters the person typed is cool. But, what about returning all the words that contain the characters in the order the person typed them. (i.e. way more suggestions so that this can be used as a scrabble word finder!)
e.g: a search for awe
could return:
adawe, awe, awearied, aweary, aweather, aweband, awedness, awee, aweek,
aweel, aweigh, awesome, awesomely, awesomeness, awest, aweto, chawer,
clapperclawer, clawed, clawer, cockawee, dewclawed, drawee, drawer, drawers,
flawed, fleaweed, gewgawed, gimbaljawed, gimberjawed, gnawer, hawer, jawed,
jimberjawed, keawe, knawel, Meccawee, megaweber, outawe, overawe, overdrawer,
overjawed, pawer, plugdrawer, predrawer, quartersawed, redrawer, resawer,
rondawel, Sandawe, sawed, sawer, scrofulaweed, seaweed, seaweedy, strawen,
strawer, tawer, tawery, thawer, toothdrawer, ultrawealthy, unawed, unchawed,
unclawed, underdrawers, underjawed, unflawed, unlawed, unoutlawed, unpawed,
unsawed, untawed, unthawed, wickawee, wiredrawer, withdrawer, wittawer
not just:
awe, awearied, aweary, aweather, aweband, awedness, awee, aweek, aweel,
aweigh, awesome, awesomely, awesomeness, awest, aweto
Making this usable relies on writing a front-end function to sort the results into those which start with the typed characters, and those which merely contain them. and displaying the results segmented accordingly. Also it will look a lot better if the characters the person typed were hightlighted in the list of word suggestions.
Note: you will need to update your test for the number of
results returned by the ac.findWords
method to reflect the wider search...