Sadaqat Academy provides free learning courses, scholarships, guidance, Test Preparations, videos lectures, past papers for all class.

No More Tension: All is here

Guidances, TimeTable, News etc.

Welcome Here in Sadaqat Academy

Free Learning Courses, scholarship, guidance, Test Preparation, Video Lectures, Past Papers of All Classes

Past Papers

Past Papers of All classes and All universities

Download Our Mobile Application

Educational Related Applications, Fun related and much more, from download section.

Educational news

Be Updated in detail with us

All is here

Video lectures, Motivational Videos and too much more here

Friday, April 22, 2022

Mobile Development - Lecture 22

 

Mobile Development- Using React Native - Lecture 22

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • Recap
## LECTURE 22  RECAP


    -> NEW COMPONENT OF REACT NATIVE 
        -> Button, Input, 
            -> we made login ( REGISTER )
        -> Image 
            -> URL, LOCAL image
        -> Flex and Styling 
            -> basics
    -> FILE MANAGMENT kasa krni h
        -> ../../src/component/data.js 
        -> ./
    -> Basics of Github
        ->use via VSCODE Gitlens and git panel
    -> Extentions
        -> basics RN extention
    -> Payoneer
        -> basics of what it is
        -> jazzCash(mobilinkMF)/Zindgi(JSBank)
    -> Password manager
        -> LastPass
    -> Packages
        -> Authentic package 
            -> wix,shopify,facebook,amazon, expo, react-native-community,
            -> React native Awesome ( repo of many many packages and learning resources )
            -> The Net Ninja ( to watch expo guide )
        -> how to use the package
            -> package install
            -> after install file changes
            -> how to use package in your code


===========================================================================


PACKAGES=>
    => we will be installing 3rd party codes for our app
        e.g. react native calendars



https://coolors.co/

Border 
Radius
Margin (up,down,left,right) ( extrenal spacing )

ALignSelf ( it works on the component that you are using )


Padding  : ( internal Spacing )
Share:

Thursday, April 21, 2022

Mobile Development - Lecture 21

 

Mobile Development- Using React Native - Lecture 21

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • What are packages or dependencies
  • Payoneer Account Registration

# Lecture 21

# What are packages or dependencies  
    npm ( packages )
    nodeProject ( dependencies )


# how to install  a package

- 'npm install {{package name}} -- {{flag}}'
    - npm install --save react-native-calendars


# what happens after we get a package installed
-  you get a change in package.json ✅
    - we get the package name in dep-block  with a version name *1
-  a change in node_module
-  a change in lock files 


# *1 VERSION
    - with time packages update and improve 
    💡 0.001  (beta version ma hain hm) (BETA === NOT FULLY DEVELOPED YET)
    💡 1.22 (ak alpha build rooled out)
    💡 ~ === approx (currently installed version might be update into another number soon) 

## How to Use package
    you have to import the details out of the package!

IMPORTANT TIP

  -> DO NOT PASTE YOUR SENSTIVE DETAILS IN A NOTE
  -> alaways use hard passwords and save thme in a password Manager
  -> secure notes 
  - >  LASTPASS 
 2FA

Share:

Mobile Development - Lecture 20

 

 Mobile Development- Using React Native - Lecture 20

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • Introduction to RN Styling, extensions and Packages
# RN Styling, extentions and Packages

💡 always do authenitc extentions in your vscode


## Packages

third party code that helps us in the working of our applications/softwares
the service for 3rd party we use is 

npmjs.com (node pacakge manager )

npm will help us to install packages


https://reactnative.dev/docs/navigation
https://reactnative.dev/help#reactiflux-chat


💡 based on NODE we got EXPO(which is a package for RN to help us make mobile apps)
Electron



## how to install and make sure package is working

 - npm install {{PACKAGE_NAME}}  --{{flags}} ✅
    - 3 things will be updated
     -lock file updation
     -node_module updation
     -package.json updation 🏋🏽

- what happens in package.json
    - 
Share:

Mobile Development - Lecture 19

 

 Mobile Development- Using React Native - Lecture 19

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • Github (Practical)




# Directories and Github In Practice
# Some Components from React Native


## Directories
💡 you have to be a super user of your computer! 💡

WINDOWS =>  \ \\ . .. (directories)
Mac/linux => / // . .. 

(powershell) GIT Bash 

### Define and read directories

"." === ./ (current folder/directory)
    e.g ./src = (src folder k andr)
".." == (go back one directory)
    e.g ../../src/assets
    

# GITHUB in ACTION
- repos (we made a repository)
- remote (using remote we link our code with that repository AKA CLONE)
- stage (choose what you want to send to the remote repo)
- commit 
(give a name*1 to all the things that are in staged changes area) 
*1: name AKA snapshot

- branch
push
pull
fetch



💡 install gitlens extention that will make your VSCODE git usage super smart and easy 💡
Share:

Mobile Development - Lecture 18

 

Mobile Development- Using React Native - Lecture 18

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • How to add image in background in App.js
  • Introduction to github
lecture part 1
How to add image in background in App.js
App.js
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Image, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>

      <Image
        source={require('./assets/dp2.png')}
      />
      <Image
      source={{
        uri: 'https://cdn.pixabay.com/photo/2020/04/11/18/05/red-matrix-5031496_1280.jpg'
      }}
      style={{
        width:"100%",
        height:"100%"
      }}
      />
  
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});



# lecture18.md

# TOPIC 2 new RN Components + github basics

github  (code should be free for everyone to see or give suggestions === OPEN SOURCE) => MICROROST OWNED

 -> github.com 
    - Account creation ✅
    - how git works on it 

## GITHUB IS MADE UP OF:
- REPOSITORIES
    => project/s ( single project (standalone-repo ✅ ) vs multi project (mono-repo)
    )
- Contributor
    => OWNER
    => someone else can update your code will be called contributor
# GIT WORKING

### we have 3 areas in git 💡

- unrevisioned files area 
( you made a file and did not revise it for git)


- staged files area 

(you revised and added the files to be committed later)

- committed files area
 (named those staged files under a single meesage for git)


### pushppa pullpa algo of git

either you can push the code
or you can pull code (fetch the code info)
- push 
- pull
- fetch

# CLONE 
you have a backup that mocks the back up on github.com

# Branch
Exam Area/block (main branch)
you can have as many branches as you want!

# remote 
your controller that talks to your clone




💡 COMMAND OF GIT INIT? 
    => puts info about the clone in your local project  (hidden folder will be made .git)



Share:

Mobile Development - Lecture 17

 

Mobile Development- Using React Native - Lecture 17

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • Introduction to MyBooks App
  • login page design (Hint: Successfully Run)
# Lecture 17

## how to take user input? and use it as well
   Text Input
   for text input you are suppposed to use Input Component from ReactNative



## Git vs Github 

    Bill Gates ( microsoft )
    Steve jobs ( apple )
    linus Torvald (linux) free products
        -> Linux (OS)
        -> Git (code helping software)

git => german word (Dheet)

 based on GIT companies got formed. (github,gitlab,bitbucket,MS Azure cloud)
 => git helped them to share/read/save/deploy code online! 

 github

 -> user signup
 -> project at github.com
 -> attach the github project to local project on your machine using GIT (origin remote attachement)
 -> stage your code ( sperate out the files to commit)
 -> commit your code (staged file under a keyname(snapshot))
 -> push your code (send your commit/s to origin remote)



## ASSIGNMENT
    => make a dummy Signup Page 
        -> name, email, password, button


login.js
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, TextInput, View } from 'react-native';

function Login() {
  return (
    <View style={styles.container}>

    <View style={styles.upperContainer}>
        <Text style={styles.title}>MyBooks</Text>
    </View>
    <View style={styles.midContainer}>

      <Text>Email</Text>

      <TextInput
        placeholder='Enter your email'
        style={styles.input}
        onSubmitEditing={(inputData)=>{
          alert(inputData.nativeEvent.text)
        }}
        keyboardType={"email-address"}
      />

      <Text>Password</Text>

      <TextInput
        placeholder='Enter your Password'
        style={styles.input}
        secureTextEntry={true}
      />

    </View>
    <View style={styles.bottomContainer}></View>

    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },

  upperContainer:{
    flex:1,
    justifyContent:'flex-end',
    alignItems:'center'
  },
  midContainer:{
    flex:2,
    padding:10,
  },
  bottomContainer:{
    flex:1,
    backgroundColor:'red'
  },

  title:{
      color: 'blue',
      fontWeight: 'bold',
      fontSize:30
  },
  input:{
    borderWidth:1,
    height:50
  }

});


export default Login;



App.js
import { StatusBar } from 'expo-status-bar';
import Login from './src/screens/login';


export default function App() {
  return (
    <Login/>
  );
}
Share:

Mobile Development - Lecture 16

 

Mobile Development- Using React Native - Lecture 16

Lecture Outcome:

At the end of the lecture, students will be able to know about

  • MyBook App (Practical)
# Lecture 16

# MyBooks App p#2

  we need to align component in a container!

  VERTICAL (FLEX )

  - JustifyContent ( default === Flex-start(left)) works verticaly
  - AlignItems ( works horizontly )

# WHAT WE NEED

- DASHBOARD ( listing the books and asking for user AUTH(login/signup))
- Login
- Signup
- ForgetPassword
- Profile
- Book Search
- Book Detail Screen
- Favourite this book for me


 ### GENERAL_INFO
- BACKEND (DATA storage and management)
    - SERVER_SIDE
    - FIREBASE( we will be using this as our backend service )




# ============= PART TWO ===============

proTip:  always document your steps

- folder structure basic (v1)
- login UI into code
- make sure it runs on Both OS
- backup of code (ignoring of node_modules)



login.js
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';

function Login() {
  return (
    <View style={styles.container}>

    <View style={styles.upperContainer}>
        <Text style={styles.title}>MyBooks</Text>
    </View>
    <View style={styles.midContainer}></View>
    <View style={styles.bottomContainer}></View>

    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },

  upperContainer:{
    flex:1,
    justifyContent:'flex-end',
    alignItems:'center'
  },
  midContainer:{
    flex:2,
    backgroundColor:'purple'
  },
  bottomContainer:{
    flex:1,
    backgroundColor:'red'
  },

  title:{
      color: 'blue',
      fontWeight: 'bold',
      fontSize:30
  }

});


export default Login;



App.js
import { StatusBar } from 'expo-status-bar';
import Login from './src/screens/login';


export default function App() {
  return (
    <Login/>
  );
}
Share:

Search This Blog

Recent Posts