Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Shivendra
@codelibra
coding conventions for android project
Shivendra
@codelibra
Hi satya..
Shivendra
@codelibra
@sst2k2 any progress on the android stuff dude?
satyajn1
@satyajn1
Hi..
We will have to add android-22 in .travis.yml file to make the build pass..

language: android
jdk: oraclejdk7
env:
matrix:

    - ANDROID_TARGET=19 ANDROID_ABI=armeabi-v7a

android:
components:

          - platform-tools
          - tools
          - android-22
          - build-tools-23.0.1
          - extra-android-support
          - extra-google-google_play_services
          - extra-google-m2repository
          - extra-android-m2repository
          - addon-google_apis-google-21
          - sys-img-armeabi-v7a-android-19
Shivendra
@codelibra
awesome job satya
the build is now passing after merging ur pull request.
sst2k2
@sst2k2
Hello satya....great job...:)
satyajn1
@satyajn1
@sst2k2 Hi.. Thanks!
Shivendra
@codelibra
Hi guys
everyone here?
sst2k2
@sst2k2
Yup
Shivendra
@codelibra
integrated gitter with bitbuket
u can see commits in right
satyajn1
@satyajn1
yes
Shivendra
@codelibra
Integrated with trello
so my changes to trello are also visible.
so any issues with setting up android studio?
satyajn1
@satyajn1
issues came..now done with them..
Shivendra
@codelibra
nice
Shivendra
@codelibra
Updated trello with the high level things.
satyajn1
@satyajn1
Tip
To create a bookmark for your account's unique sign-in page in your web browser, you should manually enter your account's sign-in URL in the bookmark entry. Don't use your web browser's "bookmark this page" feature.
satyajn1
@satyajn1

For connection through terminal -

-First install EB CLI using http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html
-Run eb init, which will configure the eb command line to one of your running eb instances. I have created the RDS and beanstallk in N.Virginia region. Choose TestServer as the name of the application.
-Run eb ssh —setup to configure your EB Environment to allow ssh inbound traffic.

  • Run eb ssh commnd to finally connect.
  • To connect with database run this - mysql -h mysql-nvirginia.ck060ykrj6h1.us-east-1.rds.amazonaws.com -P 3306 -u satya -p CollegeKhabar
    Here -h - endpoint name [you can verify it from RDS console. Dont forget to select correct region. I ended up wasting lot of time because of this.]
       -P port
       -u master username which is created when we create RD
       -p name of database
    It will prompt for master password which is manit106
  • Although I have installed mysql on ec2 machine. But if on running the command it doesn't recognize mysql then you will have to manually install it.
Format totally changes when I hit enter
sst2k2
@sst2k2
Some of the wrong coding practices I observed.
//always use a property file for configuration purposes as everything cannot go into startup parameters
//always provide an sql in the sql folder for the db entities for others to execute in db before starting the applicaiton.Later this can be automated on system startup.
//Why is every method static in this class.There was no specific need for this.
//Try to use wrapper classes like Boolean and not native datatypes boolean as these wrapper classes provide a lot of functionalities.
//Null pointer checks have not been handled properly anywhere.NPE is a crime and obviously its solution is not just a npe check.
//Code reuse has not been kept in mind
So guys I would like to introduce practice of peer reviews as this would ensure that atleast 2 ppl know about the changes and further it would ensure no buggy code is being committed.
sst2k2
@sst2k2
I am sharing an eclipse.epf file. This is the eclipse preferences file. Please import this into your eclipse workspaces as this would format all our code. Please ensure you do not commit any code if you have not imported this .
I will commit this file with the project.
sst2k2
@sst2k2
Also one major doubt. Why is a single user assigned multiple roles...??
This should not be the case.
One user will have only one role.
Each role will have a set of privileges.
Shivendra
@codelibra
why cant a user be part of 2 roles
?
in real world... let's say..
a user can be both an admin and an HOD
satyajn1
@satyajn1
Every method is static in DBConnect is more like a utility class ..Methods are not dependent on instance creation ..I couldn't think of the scenario where we would ever need to create instance of this class, that's why the constructor is also private..another way was to make the class singleton and then make every method non static and access through this object...but why should we bother about calling getInstance() every time for accessing some method..so I made every method static..
satyajn1
@satyajn1
One user will have only one role.Each role will have a set of privileges. - if we do like this then we would end up making lots of roles unnecessarily...suppose there r 2 privileges P1 and P2, then some user has privilege P1 and another has P2 and then someone has both.. then you will have to define 3 roles which doesn't make sense
satyajn1
@satyajn1
*in DBConnect because it
sst2k2
@sst2k2
Regarding DBConnect class...first assumption that it will just be a utility class is doubtful. There can be 2 scenarios when the DBConnect class stores data to a particular connection or not. In case it stores data to a single connection with database then we probably would need multiple instances of DBConnect as single application should be able to make multiple connections to db. Single connection wont do the job...I have many scenarios to explain this. Second case where DBConnect is just a utility class that provides a new connection when feeded in with connection parameters.In addition to this there is a wrapper class that holds data for connection. So current implementation is neither of the two...the connection params are being asked from System properties.Singleton class usage would better for our usage puposes...you can check out at this link...
Regarding roles we need to discuss...
satyajn1
@satyajn1
okay..i didn't keep multithreaded environment in mind where we'll need multiple connections..we should use a connection pool then..
Shivendra
@codelibra
dbconnect should not be static.. this was a test class to test end to end functionality.