create account

Kivy Blueprints by Mark Vasilkov by geekgirl

View this thread on: hive.blogpeakd.comecency.com
· @geekgirl ·
$22.39
Kivy Blueprints by Mark Vasilkov
![kivyblueprints.jpg](https://cdn.steemitimages.com/DQmdypRNxgDHmPtr4f3rkP5TvUm66Pf2axw5TGZzHRfWSmk/kivyblueprints.jpg)

As I wrote a couple of days ago I started learning Kivy library. It is a python library for creating cross-platform GUIs. You can read more [here](https://steemit.com/python/@geekgirl/i-want-to-learn-kivy) my reasons as to why I want to learn Kivy. I have read and watched several different tutorials, among which I found quite interesting and useful is a book ***Kivy Blueprints by Mark Vasilkov***.

While I would definitely recommend this book to anybody who is interested in learning Kivy, I should mention that it was published in 2015. Considering how fast technologies evolve and change, 5 years is very old for any programming related textbook. Programming languages and libraries change and get updated frequently these days. At first, I was on the fence to go with this book or not for that simple reason. After carefully glancing through the index of the contents, I drew my attention even more. It listed various use cases of building a GUI with Kivy that I didn't see other online tutorials covering.

Kivy Blueprints is a collection of 9 tutorials. Users can follow along with the author and build Apps for different use cases. It consists of 9 chapters, and each chapter covers creating an App and exploring Kivy's capabilities for various use cases. The book is not too short and not too long. It has 282 pages.

<center>List of Chapters:</center>

* Chapter 1: Building a Clock App
* Chapter 2: Building a Paint App
* Chapter 3: Sound Recorder for Android
* Chapter 4: Kivy Networking
* Chapter 5: Making a Remote Desktop App
* Chapter 6: Making the 2048 Game
* Chapter 7: Writing a Flappy Bird Clone
* Chapter 8: Introducing Shaders
* Chapter 9: Making a Shoot-Em-Up Game

This is not one of your boring textbooks. The author is very talented in explaining the material and keeping the readers engaged with the book. The authors writing style is similar to story-telling. While understanding python will be helpful it is not a requirement. Since python is easy to read the language, beginners can follow along with the process and logic the author is implementing. The author does a great job starting out with the very basics, explaining each step, and putting pieces together in a very understandable manner. Along the way, the author offers tips and tricks for a better approach in utilizing the Kivy library, and cautions about certain potential problems beginners may face.

Building GUI with Kivy can be done with only python code. However, Kivy's true power is in its KV language. KV language is built to keep the layout and design of widgets of the GUI separate from the logic and functions of the program. It makes it easy to prototype the UI. This is done by creating a separate file with .kv extension. The naming of the file is important. Let's say we name our app as SteemApp, which is done with creating a SteemApp subclass using Kivy's App class. Then we name our KV file as steem.kv. As long as both python and kv files are saved in the same location, Kivy will automatically detect the kv file and use it when App is run.

Simple boilerplate code would look like the following.

**Code for steemApp.py file:**

<pre>
from kivy.app import App
class SteemApp(App)
	def build(self):
		self.title = 'My Steem'
if __name__ == '__main__':
	SteemApp().run()
</pre>

<br/>
**Code for steem.kv file:**
<br/>

<pre>
BoxLayout:
	orientation: 'vertical'
	Label:
		text: '40,714,376'
	BoxLayout:
		orientation: 'horizontal'
		Button:
			text: 'Get Last Block'
		Button:
			text: 'Get Block Content'
	Label:
		text: 'Block Content'
</pre>

<br>

When steemApp.py is run Kivy will look for steem.kv file and build the GUI. The result of the code would like this.

![steemApp.png](https://cdn.steemitimages.com/DQmYiYZGNYRdUDMQ9fuRn7aZ66tM7qHQNmvEeLvAEcWv2cm/steemApp.png)



Of course, this GUI doesn't do anything and doesn't look great yet. This was to demonstrate how easy it is to get started with Kivy, especially using kv language.  In KV language, similar to python indentation has a meaning. Using indentations we can nest our widgets within other widgets. The naming convention in KV also makes it easy to recognize the types of widgets and layouts. We can also create our own custom widgets. 

The author does a great job in explaining how kv language works, how it works together with the logic and functions in the python code, offers best practices in creating UI with examples. The book shows some aspects of kv language that I haven't seen in other tutorials yet. One of them is how KV utilized BBCode as a markup language in formatting text.

Overall, I really like the book. I wish there was a more up-to-date version of it. I couldn't find any. For a beginner, it is a great starting point. I think even intermediate programmers can find some new information in this book. Some of the tutorials in the books are dedicated to Android or Windows operating systems. As an iPhone and Mac users, I wish there was more content specific for iOS and Mac operating systems. Kive Blueprints is available in print and ebook versions on Amazon.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 315 others
properties (23)
authorgeekgirl
permlinkkivy-blueprints-by-mark-vasilkov
categoryhive-174578
json_metadata{"tags":["programming","coding","review","books","python"],"image":["https://cdn.steemitimages.com/DQmdypRNxgDHmPtr4f3rkP5TvUm66Pf2axw5TGZzHRfWSmk/kivyblueprints.jpg","https://cdn.steemitimages.com/DQmYiYZGNYRdUDMQ9fuRn7aZ66tM7qHQNmvEeLvAEcWv2cm/steemApp.png"],"links":["https://steemit.com/python/@geekgirl/i-want-to-learn-kivy"],"app":"steemit/0.2","format":"markdown"}
created2020-02-11 03:48:00
last_update2020-02-11 03:48:00
depth0
children2
last_payout2020-02-18 03:48:00
cashout_time1969-12-31 23:59:59
total_payout_value12.288 HBD
curator_payout_value10.106 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,191
author_reputation1,590,042,504,791,540
root_title"Kivy Blueprints by Mark Vasilkov"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id95,315,109
net_rshares64,445,538,996,363
author_curate_reward""
vote details (379)
@variously ·
$0.19
It all sounds too geeky 🤣
👍  
properties (23)
authorvariously
permlinkq5iqy4
categoryhive-174578
json_metadata{"app":"steemit/0.1"}
created2020-02-11 03:56:27
last_update2020-02-11 03:56:27
depth1
children1
last_payout2020-02-18 03:56:27
cashout_time1969-12-31 23:59:59
total_payout_value0.096 HBD
curator_payout_value0.096 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation428,898,181,606
root_title"Kivy Blueprints by Mark Vasilkov"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id95,315,375
net_rshares875,938,771,323
author_curate_reward""
vote details (1)
@geekgirl ·
Thank you.
👍  ,
properties (23)
authorgeekgirl
permlinkq5itbk
categoryhive-174578
json_metadata{"app":"steemit/0.1"}
created2020-02-11 04:47:45
last_update2020-02-11 04:47:45
depth2
children0
last_payout2020-02-18 04:47:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation1,590,042,504,791,540
root_title"Kivy Blueprints by Mark Vasilkov"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id95,316,564
net_rshares984,371,024
author_curate_reward""
vote details (2)