<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_Apps_2023W_Lecture_9</id>
	<title>Mobile Apps 2023W Lecture 9 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_Apps_2023W_Lecture_9"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_Apps_2023W_Lecture_9&amp;action=history"/>
	<updated>2026-04-08T03:15:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_Apps_2023W_Lecture_9&amp;diff=24350&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Notes==  &lt;pre&gt; Lecture 9 ---------  Key challenge this semester is design as much as implementation So...I&#039;m going to design and build an app, and walk you all through it  What websites have I been visiting?  - I visit all kinds of places  - I don&#039;t make bookmarks  - yes there is history, but it isn&#039;t easy to view  - would love the browser to eventually help direct my browsing towards    things I, at a high level, want to visit rather than what is most easily in &quot;reach...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_Apps_2023W_Lecture_9&amp;diff=24350&amp;oldid=prev"/>
		<updated>2023-02-08T21:02:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Notes==  &amp;lt;pre&amp;gt; Lecture 9 ---------  Key challenge this semester is design as much as implementation So...I&amp;#039;m going to design and build an app, and walk you all through it  What websites have I been visiting?  - I visit all kinds of places  - I don&amp;#039;t make bookmarks  - yes there is history, but it isn&amp;#039;t easy to view  - would love the browser to eventually help direct my browsing towards    things I, at a high level, want to visit rather than what is most easily in &amp;quot;reach...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 9&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
Key challenge this semester is design as much as implementation&lt;br /&gt;
So...I&amp;#039;m going to design and build an app, and walk you all through it&lt;br /&gt;
&lt;br /&gt;
What websites have I been visiting?&lt;br /&gt;
 - I visit all kinds of places&lt;br /&gt;
 - I don&amp;#039;t make bookmarks&lt;br /&gt;
 - yes there is history, but it isn&amp;#039;t easy to view&lt;br /&gt;
 - would love the browser to eventually help direct my browsing towards&lt;br /&gt;
   things I, at a high level, want to visit rather than what is most easily in &amp;quot;reach&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(Basically, how do I do more &amp;quot;healthy&amp;quot; browsing rather than &amp;quot;junk food&amp;quot; browsing)&lt;br /&gt;
&lt;br /&gt;
Imagine a browser as a helpful assistant rather than a dumb app&lt;br /&gt;
&lt;br /&gt;
And doing it as a mobile app would be cool because, hey, that&amp;#039;s where I browse the most.&lt;br /&gt;
&lt;br /&gt;
So what I want to do is do the simplest version of this app I can&lt;br /&gt;
 - not quite an MVP&lt;br /&gt;
 - gets access to all the info I want, can process it&lt;br /&gt;
 - the processing is an open-ended project, so will just do it in a minimal fashion&lt;br /&gt;
&lt;br /&gt;
Why is this good for class?  It touches most everything&lt;br /&gt;
 - need to design a good UI&lt;br /&gt;
 - background processing&lt;br /&gt;
 - web technologies (embedded browser, maybe generating pages)&lt;br /&gt;
 - maybe access web services to store &amp;amp; retrieve info of various kinds&lt;br /&gt;
    - search engines?&lt;br /&gt;
    - get general context&lt;br /&gt;
 - location (for showing relevant past browsing)&lt;br /&gt;
 - networking&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
How do you start with this?&lt;br /&gt;
 - well, we already have&lt;br /&gt;
 - first you need to understand the tech&lt;br /&gt;
 - then you need to try building it&lt;br /&gt;
 - when you are building and you realize you don&amp;#039;t know the tech,&lt;br /&gt;
   go and figure it out&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;ve done basic UI, embedded web browser, basic REST API&lt;br /&gt;
&lt;br /&gt;
The core of this, however, is the web history&lt;br /&gt;
Remember, always start with your core data structures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We want the data to be persistent, queryable, and structured.  We&amp;#039;re using a database!&lt;br /&gt;
&lt;br /&gt;
SQLite is the obvious choice for a database integrated into a mobile app&lt;br /&gt;
&lt;br /&gt;
So what&amp;#039;s our initial goal&lt;br /&gt;
 - web browser&lt;br /&gt;
 - which shows the current URL&lt;br /&gt;
 - with the URL and other aspects of the page stored in a database on the device&lt;br /&gt;
&lt;br /&gt;
So initially we&amp;#039;ll just need the following fields in our database:&lt;br /&gt;
 - date/time, host, URL, page title&lt;br /&gt;
 - entry for every visit&lt;br /&gt;
    - not compact, will have lots of redundancy&lt;br /&gt;
    - but easy to build for now&lt;br /&gt;
&lt;br /&gt;
Make sure you store &amp;amp; represent all the data that could be relevant in their raw form&lt;br /&gt;
 - can later optimize and extract important characteristics&lt;br /&gt;
&lt;br /&gt;
Try for minimalism where you can&lt;br /&gt;
 - lowers complexity&lt;br /&gt;
 - try to maximize othonogonality of components, allow for component reuse&lt;br /&gt;
&lt;br /&gt;
So before we do the web browser with a history, to minimize complexity what do we next need to build?&lt;br /&gt;
 - simple app that stores info in a local database&lt;br /&gt;
 - then, we build a web browser with a history in an array&lt;br /&gt;
 - then we build a web with history in the local database&lt;br /&gt;
&lt;br /&gt;
First, how do we do databases like SQLite in android?&lt;br /&gt;
 - we could use built-in support for SQLite&lt;br /&gt;
    &lt;br /&gt;
 - we could use Rooms:*&lt;br /&gt;
    https://developer.android.com/training/data-storage/room&lt;br /&gt;
&lt;br /&gt;
 - or we could use raw SQLite&lt;br /&gt;
    https://developer.android.com/training/data-storage/sqlite&lt;br /&gt;
&lt;br /&gt;
Rooms looks much nicer!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, how do we get browser history? I see three approaches&lt;br /&gt;
 - have users browse in new app*&lt;br /&gt;
 - extract history from an existing browser on device&lt;br /&gt;
 - extract history from a cloud service&lt;br /&gt;
&lt;br /&gt;
How can we know what URL we have visited?&lt;br /&gt;
 - we&amp;#039;ll just remember the webviews we&amp;#039;ve visited&lt;br /&gt;
&lt;br /&gt;
Stop here, on Friday we&amp;#039;ll look at some code using the Rooms API to access a SQL database&lt;br /&gt;
 - note I&amp;#039;ll be in NYC, but shouldn&amp;#039;t have too many technical issues hopefully&lt;br /&gt;
&lt;br /&gt;
On Friday we&amp;#039;ll start however with you all telling everyone about your progress&lt;br /&gt;
 - would be great for you all to demo little bits of functionality that you have running&lt;br /&gt;
&lt;br /&gt;
Now I&amp;#039;ll do tutorial checkoffs, answer questions&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m going to make T3 be with databases, T4 will be a simple web browser&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>